//decrease time as effect has happened, and adjust the creatures health public override void doEffect(GenericPerson creature) { time--; int damage = bonus + amount; int burnt = creature.hurt(damage); printInfo(creature, burnt); }
//create a strike class for the player public Strike(Player player) { spell = null; melee = null; ranged = null; thing = player; getAttack(); }
public override void doEffect(GenericPerson creature) { int healedAmount = creature.heal(amount); Constants.writeLine("DEBUG:: In EffectHeal, healedAmont == " + healedAmount); time--; printInfo(creature, healedAmount); }
public override void doEffect(GenericPerson creature) { int num = creature.hurt(amount + bonus); if (buff.isActive()) { buff.doBuff(creature); } time--; printInfo(creature, num); }
protected void printInfo(GenericPerson creature, int num) { if (creature.GetType().IsSubclassOf(typeof(GenericCreature))) {//this is a creature printInfoCreature(creature, num); } else {//otherwise, it's the player printInfoPlayer(creature, num); } }
protected override void printInfoPlayer(GenericPerson player, int num) { Constants.writeLine("You have been healed for&4 " + num + " &15HP."); }
protected override void printInfoCreature(GenericPerson creature, int num) { Constants.writeLine(creature.getName() + " has been healed for&4 " + num + " &15HP."); }
public abstract void doBuff(GenericPerson person);
//create a strike class for a creature public Strike(GenericCreature creature) { thing = creature; getAttack(); }
protected abstract void printInfoPlayer(GenericPerson player, int num);
protected abstract void printInfoCreature(GenericPerson creature, int num);
public abstract void doEffect(GenericPerson creature);
//"Freeze" the target, making them unable to move/ attack public override void doBuff(GenericPerson person) { person.attacked();//by doing this, it prevents this person from doing another attack time--; }