Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <DB xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <fighter name="Test Fighter">
- <stats maxhp="30" atk="10" def ="10" pow="10" res="10" eva = "10" acc="10" />
- <!--Basic attack ability. Deals damage equivalent to attack stat, with 20% damage variance (0.9* to 1.1*)-->
- <ability name="Attack">
- <validTarget>enemy</validTarget>
- <tags>#physical #basic</tags>
- <power>1</power>
- <!--0.2 is default variance value-->
- <variance>0.2</variance>
- </ability>
- <!--Heals for 30% of Power stat each turn-->
- <passive name="Regeneration">
- <onTurnStart>healing = a:heal(a.stats["pow"]/3*Random:variance(0.3),a)
- if healing > 0 then
- outputMessage(a:getName().." healed for "..healing.." damage!")
- end
- </onTurnStart>
- </passive>
- <!--Gain attack / defense buff at low health-->
- <passive name="Enrage">
- <!--"aspects" stores buffs / passives / resources / abilities that the ability might use.-->
- <aspects>
- <!--buff lasts 3 turns. Multiplies attack, defense, and evasion by these values-->
- <buff name="Enraged">
- <mult atk="1.5" def="1.5" eva ="0.75"/>
- <duration>3</duration>
- </buff>
- </aspects>
- <!--Create a variable called "canUse", set it to true by default.-->
- <onStart>self.canUse = true</onStart>
- <!--"onTakeDamage" occurs when the fighter takes damage, before health is lowered. The damage, attacker, and damage tags are passed in and can be used and even changed.-->
- <onTakeDamage>
- <!--When taking damage, check if the damage is enough to put the fighter below half health AND "canUse" is true.-->
- if self.canUse and a.hp - damage <= a.stats["maxhp"]/2 then
- <!--Applies the buff "Enraged" from the aspects section above, outputs a message, and sets "canUse" to false-->
- self.canUse=false
- self.applyBuff(a.id, "Enraged")
- outputMessage(a:getName().." is now enraged!")
- end
- </onTakeDamage>
- <!--At the start of the character's turn, if they are above half health and not currently Enraged, reenables this passive.-->
- <onTurnStart>
- if a.hp >= a.stats["maxhp"]/2 and next(a:getBuffs("Enrage",a)) == nil then
- self.used = false
- end
- </onTurnStart>
- </passive>
- </fighter>
- <!--Creates a new fighter called 'Mantid' with identical stats and abilities to 'Test Fighter'-->
- <fighter name="Mantid" base="Test Fighter" />
- <!--Creates a Mantid with better stats-->
- <fighter name="Elite Mantid" base = "Test Fighter">
- <stats maxhp="50" atk="14" def="12" pow="15" res="10" acc="15" eva="15" />
- </fighter>
- </DB>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement