专家模式下的钱币拾取
In Expert Mode, most enemies can pick up dropped coins. They will emit a sound () when doing so. Enemies holding dropped coins emit a sparkle effect based on the color of the best coin they are holding.
Details
When the hitbox of an enemy intersects with the hitbox of a stack of dropped coins, the enemy will try to pick up some coins from the stack. An enemy can only pick up coins if the following conditions are fulfilled:[1]
- The total value of the coins the enemy is already holding is less than the total value of the stack of coins.
- The sum of the value of the coins the enemy is already holding and the value of the stack of coins is less than 999000000, or 999 PC.
The amount of coins picked up by the enemy is then calculated by multiplying the stack amount and a factor, rounded down, with a minimal amount of 1 coin and a maximum amount of the full stack. The factor is a random value in [0.5, 0.75] (with an increment of 0.01), and will be increased with the following conditions:
- If the coin type is a Copper Coin: a random value in [0, 0.5] (with an increment of 0.01) is added to the factor.
- If the coin type is a Silver Coin: a random value in [0, 0.25] (with an increment of 0.01) is added to the factor.
For example, if a stack of 25 SC is dropped, an enemy holding 30 SC will not pick up coins from it. An enemy not holding any coins can take [math]\displaystyle{ [ 25\times(0.5+0), 25\times(0.75+0.25)] }[/math] , resulting 12–25 SC after rounding.
Invulnerable enemies will never pick up coins. See below for a list of other enemies that never pick up coins.[2]
Enemy saving

There is also a "revenge" mechanic, which saves the info about an enemy that holds coins and respawns it when the player gets near the location. The enemy's health percentage, location, and amount of coin they are holding when they despawn are saved. The location will be displayed on the minimap by coin icons, and hovering the cursor over the icon displays the amount of coins.
An enemy must fulfill all the following conditions to be saved.[3]
- The enemy picked up more than 10 SC.[4]
- The enemy is more than 41 tiles away from the top and left world border, and more than 42 tiles away from the bottom and right world border.
- These borders refer to the real-world border that cannot be seen in-game, so as long as the enemy is within the visible world border, it can be saved.
- The enemy is not a boss.
- The enemy's "rarity" is not higher than 0.[5] This makes the following enemies inapplicable.
Enemy respawning
When a saved location enters a 163×115-tile rectangular area centered on a player's center, the saved enemy is respawned. The respawned enemy's health will be restored to 50% if it is lower than 50%.[6] However, there are several special circumstances in which an enemy can or cannot respawn.[7] If the player approaches the saved location while the enemy cannot respawn, the saved enemy is removed and the coins are lost forever.
- Demon Eyes and Wandering Eyes cannot respawn during daytime, or the saved location is above the surface or not in a Graveyard.
- Certain worms cannot respawn if the saved location is above the surface. This includes the Giant Worm, Bone Serpent, Digger, Leech, and Dune Splicer.
- Tomb Crawlers cannot respawn if the saved location is not in the Underground Desert.
- Reapers can only respawn during a Solar Eclipse.
- Dripplers cannot respawn during daytime.
- Wall Creepers and Black Recluses can always respawn in The Constant and Get fixed boi worlds.
- Certain Fighter AI enemies cannot respawn during the daytime if the saved location is above the surface. See below for a list of these enemies.
- Additionally, Fighter AI enemies from certain events can only respawn when their respective event is active. This includes the Frost Moon, Goblin Army, Pirate Invasion, and Martian Madness.
Save removal
Enemy saves do not exist permanently. The game will remove invalid and expired enemy saves and the coins will then be lost forever.[8]
Certain types of saved enemies will become invalid under certain conditions:[9]
- Enemies from the following events will become invalid when their respective event is not active: Goblin Army, Frost Legion, Pirate Invasion, Martian Madness, Old One's Army.
- Enemies from Frost Moon and Pumpkin Moon will become invalid at day.
- Enemies from Solar Eclipse will become invalid at night or when Solar Eclipse is not active.
|
Enemy saves will expire after a certain amount of time. The expiration time of a saved enemy is determined by the amount of coins picked up by it.[10] Note that coin values are converted to raw Copper values (
in the following table) in the calculation (e.g. 1 PC2 GC3 SC4 CC is converted to 1020304).
v
Raw value ( )
|
Expiration time (ticks[11]) |
---|---|
<10000
|
[math]\displaystyle{ 54000+72000\times\frac{\text{Raw value}-{100}}{9900} }[/math] |
10000≤ <1000000
|
[math]\displaystyle{ 126000+108000\times\frac{\text{Raw value}-{100}}{9900} }[/math] |
≥1000000
|
450000 |
History
- 电脑版 1.4.0.1:Enemies that picked up enough coins in Expert Mode are now saved to a location when they despawn.
- 电脑版 1.3.0.4:Fixed air items being left over when enemies pick up coins in Expert Mode.
- 电脑版 1.3.0.1:Introduced.
- 主机版 1.0.933.1:Introduced. (
)
- 主机版 1.0.750.0:Introduced. (
)
- Switch版 1.0.711.6:Introduced.
- 移动版 1.3.0.7:Introduced.
References
- ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.Item.cs
中的GetPickedUpByMonsters_Money()
方法。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.ID.NPCID.cs
中的Sets.CantTakeLunchMoney
字段。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.cs
中的CacheEnemy()
方法。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.cs
中的MinimumCoinsForCaching
字段。 - ↑ Note that this rarity stat is the one used by the Lifeform Analyzer, not the rarity stat in the Bestiary.
- ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.cs
中的CheckRespawns()
和Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的SpawnEnemy()
方法 和Terraria.GameContent.CoinLossRevengeSystem.cs
中的_playerBoxSizeOuter
字段。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.cs
中的CheckRespawns()
和Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的WouldNPCBeDiscouraged()
方法。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的IsInvalid()
和Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的IsExpired()
方法。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的IsInvalid()
和Terraria.NPC.cs
中的GetNPCInvasionGroup()
方法。 - ↑ 信息来自
电脑版 1.4.4.9 源代码,
Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.cs
中的CalculateExpirationTime()
方法。 - ↑ 嘀嗒是可由软件计数的时间单位。《泰拉瑞亚》的大多数更新逻辑都会每嘀嗒发生一次。一个嘀嗒的长度为 1/60 秒,因此一秒钟内有 60 嘀嗒,一分钟内有 3600 嘀嗒。