I like the idea of Skills which can apply CellEffects to an AoE set of Cells; imagine a “poison cloud” skill which when used adds a poison effect to all of the Cells around a Mob for some number of turns.
To support this, I’ve added an Apply_CellEffect action and hooked it into the SkillDefn/CellEffectDefn sheets in the xls. Now I can define a skill like this:
That says that when the ‘poisonCloud’ skill is used, it should apply a AoE CellEffect with radius 2, around the caster (vs around a targeted mob) and the effect should last for 5 turns before disappearing. The CellEffectId “poisonpit” references the CellEffectDefn I discussed in a previous post:
That says that when an Actor enters the Cell with the CellEffect, take 2 HP. That’s a fairly simplistic CellEffect, but per earlier posts, that could also just as easily apply a Buff or any other action.
The last column indicates that when the CellEffect is applied to a Cell, it should add the ‘poisonPitAdornment’ to the Cell. This is a visual (tracked as an ItemDefn) which adds a tile and optionally light(s) and particle effect(s). It’s defined like this:
That defines the TileDefn, LightDefn, and ParticeGeneratorDefn to use when the CellEffect is applied to a Cell.
Put all of that together, and now when the user uses that skill, a cloud of poison celleffects appears around them:
That’s all done without touching code. It’s also a small leap from the above to a Trap which applies an AoE CellEffect around it when the Cell it’s on is entered. First though; completing weapons/armor adding buffs and damage (et al) modifiers when equipped…