The goal with the Event/Action system is to make it really, really easy to add new and special functionality to the game once the core is in place.  As an example, it took me all of five minutes to add a “KilledActor” EventType which is fired whenever an Actor is killed; this allows me to now create something like a “Dagger of Deadly Healing” that heals the wielder for 10% of health whenever they kill something.  Or, a hatchet that performs magic mapping every time the wielder rests (okay, less likely a real item, but still…).  The following works:

    <Weapon Id="Axe1" Name="Rusty Hatchet of Restful Mapping" Subclass="Axe" WeaponPower="10" ItemLevel="1" Level="1-3"
            Tile="AxeBeaked" Description="A rusty hatchet">
      <Event Type="StartResting">
        <MagicMapping Amount="1%"/>
      </Event>
    </Weapon>
    <Weapon Id="ShortBlade1" Name="Balanced Dagger of Deadly Healing" Subclass="Short Blade" WeaponPower="7"
            ItemLevel="4" Level="1-6" Tile="Dagger01" Description="A well crafted dagger" >
      <Event Type="KilledActor">
        <Heal Amount="10%" Target="Self" />
      </Event>
    </Weapon>

No new code drop this morning, hopefully tonight…

Jeff

Advertisements