protected override void die() { string[] messages = new string[1]; messages[0] = this.name + " has died!"; SubStateAbstract message = new SubStateConfirmMessage(messages, 50, 405, 400, 200, StateHandler.State); StateHandler.State = message; }
public override void action(Monster parent) { if (!charged) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "IMA CHARGIN MAH LASERS!"; charged = true; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; } else if (charged) { charged = false; MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "IMA FIRIN MAH LASERS!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; int choice = Globals.Random(0, 3); int bonus = 1000; if (PCBuilder.getPC(choice).IsDefending()) { bonus = 0; } parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_FIRE, "LASERS", bonus); } }
public override void action(Monster parent) { if (!charged) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "IMA CHARGIN MAH LASERS!"; charged = true; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; } else if (charged) { charged = false; MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "IMA FIRIN MAH LASERS!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; int choice = Globals.Random(0, 3); int bonus = 1000; if (PCBuilder.getPC(choice).IsDefending()) bonus = 0; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_FIRE, "LASERS", bonus); } }
internal void setDefend(bool flag) { this.defending = flag; if (flag) { MessageBoxInterface[] info = new MessageBoxInterface[1]; Color[] colors = new Color[1]; string[] status = new string[1]; status[0] = Name + " is now defending!"; colors[0] = Color.White; SubStateAbstract message = new SubStateConfirmMessage(status, 50, 400, 350, 450, StateHandler.State); StateHandler.State = message; } }
public override void action(Monster parent) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "Nature attack 2.0?"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_NATURE, "nature", 20); }
public override void action(Monster parent) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.CornflowerBlue; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "HURRICANE!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_WATER, "hurricane", 40); }
public override void action(Monster parent) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "IMA FIRIN MAH LASER!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_PHYSICAL, "cowabunga", 0); }
public override void action(Monster parent) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.Crimson; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "FLAME STORM!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_FIRE, "flame storm", 50); }
public override void action(Monster parent) { MessageBoxInterface[] messageBoxes = new MessageBoxInterface[1]; Color[] colors = new Color[1]; colors[0] = Color.White; int mX = 400; int mY = 100; int height = 100; int width = 345; string[] attackMessage = new string[1]; attackMessage[0] = "MOTHER FREAKN NATURE!!!"; SubStateConfirmMessage temp = new SubStateConfirmMessage(attackMessage, height, width, mX, mY, StateHandler.State); StateHandler.State = temp; parent.Attack(BehaviorRSTS.acquireTarget(), Globals.ELEMENT_NATURE, "nature", 75); }
internal void Damage(int attackElement, int damage, string attackName, string attackerName, bool mpTarget) { if (attackElement != Globals.ELEMENT_PHYSICAL && damage > 0) { switch (attackElement) { case Globals.ELEMENT_FIRE: if (element == Globals.ELEMENT_WATER) { if (this is PC) { StateCombat.strategy -= 2; } else { StateCombat.strategy++; } damage *= 2; } else if (element == Globals.ELEMENT_NATURE) { if (this is PC) { StateCombat.strategy++; } else { StateCombat.strategy -= 2; } damage /= 2; } break; case Globals.ELEMENT_NATURE: if (element == Globals.ELEMENT_FIRE) { if (this is PC) { StateCombat.strategy -= 2; } else { StateCombat.strategy++; } damage *= 2; } else if (element == Globals.ELEMENT_WATER) { if (this is PC) { StateCombat.strategy++; } else { StateCombat.strategy -= 2; } damage /= 2; } break; case Globals.ELEMENT_WATER: if (element == Globals.ELEMENT_NATURE) { if (this is PC) { StateCombat.strategy -= 2; } else { StateCombat.strategy++; } damage *= 2; } else if (element == Globals.ELEMENT_FIRE) { if (this is PC) { StateCombat.strategy++; } else { StateCombat.strategy -= 2; } damage /= 2; } break; } } if (defending && damage > 0) { damage = damage / 2; } if (!mpTarget) { health -= damage; } else { mp -= damage; } if (defending) { defending = false; } string[] status = new string[1]; string damageT = "hp"; if (mpTarget) { damageT = "mp"; } if (attackerName.Length > 2) { if (damage > 0) { status[0] = attackerName + " attacks " + Name + " for " + damage + " " + damageT + " by " + attackName + "!"; } else if (damage == 0) { status[0] = attackerName + " completely misses " + Name + " with " + attackName; } else if (health >= maxHealth) { health = maxHealth; status[0] = Name + " is completely healed by " + attackerName + "'s " + attackName; } else { status[0] = attackerName + " heals " + Name + " for " + -damage + " " + damageT + " by " + attackName + "!"; } } else { if (damage > 0) { status[0] = Name + " is dealt " + damage + " points of " + damageT + " by " + attackName; } else if (damage == 0) { status[0] = Name + " is completely missed by " + attackName; } else if (health >= maxHealth) { health = maxHealth; status[0] = Name + " is completely healed by " + attackName; } else { status[0] = Name + " is healed for " + -damage + " points of " + damageT + " by " + attackName; } } SubStateAbstract message; message = new SubStateConfirmMessage(status, 50, 600, 275, 450, StateHandler.State); StateHandler.State = message; if (health <= 0) { die(); health = 0; } }
internal void Damage(int attackElement, int damage, string attackName, string attackerName, bool mpTarget) { if (attackElement != Globals.ELEMENT_PHYSICAL && damage > 0) { switch (attackElement) { case Globals.ELEMENT_FIRE: if (element == Globals.ELEMENT_WATER) { if (this is PC) StateCombat.strategy -= 2; else StateCombat.strategy++; damage *= 2; } else if (element == Globals.ELEMENT_NATURE) { if (this is PC) StateCombat.strategy++; else StateCombat.strategy -= 2; damage /= 2; } break; case Globals.ELEMENT_NATURE: if (element == Globals.ELEMENT_FIRE) { if (this is PC) StateCombat.strategy -= 2; else StateCombat.strategy++; damage *= 2; } else if (element == Globals.ELEMENT_WATER) { if (this is PC) StateCombat.strategy++; else StateCombat.strategy -= 2; damage /= 2; } break; case Globals.ELEMENT_WATER: if (element == Globals.ELEMENT_NATURE) { if (this is PC) StateCombat.strategy -= 2; else StateCombat.strategy++; damage *= 2; } else if (element == Globals.ELEMENT_FIRE) { if (this is PC) StateCombat.strategy++; else StateCombat.strategy -= 2; damage /= 2; } break; } } if (defending && damage > 0) { damage = damage / 2; } if (!mpTarget) health -= damage; else mp -= damage; if (defending) { defending = false; } string[] status = new string[1]; string damageT = "hp"; if (mpTarget) damageT = "mp"; if (attackerName.Length > 2) { if (damage > 0) status[0] = attackerName + " attacks " + Name + " for " + damage + " " + damageT + " by " + attackName + "!"; else if (damage == 0) status[0] = attackerName + " completely misses " + Name + " with " + attackName; else if (health >= maxHealth) { health = maxHealth; status[0] = Name + " is completely healed by " + attackerName + "'s " + attackName; } else status[0] = attackerName + " heals " + Name + " for " + -damage + " " + damageT + " by " + attackName + "!"; } else { if (damage > 0) status[0] = Name + " is dealt " + damage + " points of " + damageT + " by " + attackName; else if (damage == 0) status[0] = Name + " is completely missed by " + attackName; else if (health >= maxHealth) { health = maxHealth; status[0] = Name + " is completely healed by " + attackName; } else status[0] = Name + " is healed for " + -damage + " points of " + damageT + " by " + attackName; } SubStateAbstract message; message = new SubStateConfirmMessage(status, 50, 600, 275, 450, StateHandler.State); StateHandler.State = message; if (health <= 0) { die(); health = 0; } }