Base Game RoomModifiers - brandonandzeus/Trainworks2 GitHub Wiki

Base Game RoomModifiers

I would be wary of any RoomModifiers that I state aren't in use in the base game. Some may have bugs or unintended effects or just don't work. These are much harder to verify code-wise is the code that make the RoomModifiers work is scattered within other parts of the code. This isn't the case for CardEffects since their code is all within the effect.

RoomStateBuffModifier

Deranged Brute's special effect. Increases (or decreases) the amount of attack gained from rage.

  • ParamInt: Rage buff modifier

RoomStateDamageCostModifier

Tethy's Conduit spell upgrade effect. Increases (or reduces) the cost of Damage spells in hand. The exact effect is described as follows:

  1. If the Card's Effects has any effect with CardEffectDamage.
  2. If the Card has an upgrade with a CardTriggerEffect with Trigger being OnCast and the effects of that trigger is CardEffectDamage.
  3. [???] So a card that Spawns a Monster. Which has a CharacterTrigger of type OnSpawn, for which has an effect that contains CardEffectAddStatusEffect which has to apply regen.

Will have their cost modified by the parameter.

  • ParamInt: Cost modifier

RoomStateEnergyModifier

Modifies the amount of ember the player has either increasing or decreasing. This is a global RoomModifier.

  • ParamInt: Energy modifier.

RoomStateFirstSpellCostModifier

Unused Modifies the cost of the first Spell cast this turn.

  • ParamInt: Cost modifier.

RoomStateFriendlyDamageMultiplierModifier

Unused Seems to modify the Unbuffed damage for each character.

RoomStateFriendlyDamagePerCorruptionModifier

One of Spine Chief's abilities. Specifically, the one that adjusts the damage for friendly units per Charged Echoes on the floor.

  • ParamInt: Additional Damage per Charged Echoes.

RoomStateHandSizeModifier

Increase or decrease the hand size. This is a global RoomModifier.

  • ParamInt: Hand size modifier.

RoomStateHealCostModifier

Edge Prior's effect. Increases or decreases the cost of healing spells. The exact effect is described as follows:

  1. If the Card's Effects has any effect with CardEffectHeal OR a subclass of CardEffectHeal.
  2. If the Card has an upgrade with a CardTriggerEffect with Trigger being OnCast and the effects of that trigger is CardEffectHeal (exactly).
  3. [???] So a card that Spawns a Monster. Which has a CharacterTrigger of type OnSpawn, for which has an effect that contains CardEffectAddStatusEffect which has to apply regen.

RoomStateMagicalPowerModifier

Mollusc Mage's effect. This RoomModifier applies a CardUpgrade to all Spell cards in hand increasing the magic power appropriately. When the card is discarded it removes the upgrade. If the Character with the Room Modifier dies removes all of the applied temporary upgrades. If the Room selection changes removes all upgrades if we are looking at a different room and readds the upgrades if you are back on the floor with this bonus.

Sounds pretty jank, but it appears to work.

  • ParamCardUpgradeData: CardUpgrade to apply. The AdditionalDamage / AdditionalHeal fields will be adjusted based on if its Attuned.

RoomStateRegenModifier

Unused This appears to adjust the amount healed per stack of regen. Similar to RoomStateBuffModifier except for Regen.

  • ParamInt: Regen modifier

RoomStateSelfDamagePerCorruptionModifier

The Bog Fly effect. Increases the unit's damage depending on the amount of Charged Echoes in a room.

  • ParamInt: Amount of damage to gain per Charged Echo.

RoomStateSelfDamageWhenCorruptionModifier

Unused Seems to increase damage by a specified amount if there are any Charged Echoes in a room.

  • ParamInt: Amount of damage to gain.

RoomStateSpawnUnitOnUnitSpawnModifier

The Morsel Master effect. Spawns a copy of the unit when a unit is spawned on the floor and then copies stats. Can be restricted to a subtype.

  • ParamSubtype: Subtype Restriction.

RoomStateSpellCostModifier

Unused Appear to adjust the cost of all Spell cards.

  • ParamInt: Spell cost modifier.

RoomStateSpikesDamageModifier

The shard channeler effect. Increases damage done by Spikes.

  • ParamInt: Spikes damage modifier.

RoomStateStatusEffectDamageModifier

Unused This one doesn't seem to work as expected. units with any of the status effect listed will gain attack damage and deal more damage (double counted). Note it is also not cumulative a unit only needs one of the status effects present in the data.

  • ParamInt: Additional damage
  • ParamStatusEffects: Status effects to check (Only statusId from StatusEffectStackData is used)

RoomStateStatusEffectOnSpawnModifier

Unused This RoomModifier gives a status effect when a character is spawned on the floor.

This is different from CardEffectEnchant. Enchant effects will apply the status to the entire floor if the spawn points change. If characters are separated from the enchanter they lose the enchanted status effects. Enchanters are best used with a nonstackable status effect.

Here if a character is spawned on the floor they get the status effects applied to them. If they move from the floor they keep the status effect.

  • ParamStatusEffects: Status effects to apply to newly spawned characters.

RoomStateUnitCostModifier

Shardtail Queen's Imp Parade route effect. Adjusts the cost of Monster cards on the floor. Can be restricted to Monster cards with specific subtype.

  • ParamInt: Cost modifier
  • ParamSubtype: Subtype to restrict effect to