SlideShare a Scribd company logo
1 of 29
1.0 Description:
This program simulates the battle between two character
classes. In the HaveBattle class
we are having a battle between a Mage and a Warrior. You are
to write the supporting code using inheritance and a touch of
polymorphism.
1.1 Characters
There are two types of CharacterClasses, Warriors and Mages.
Each CharacterClass has
a currentHP, maxHP. Warriors also have an implicit armor that
offsets 10 damage.
CurrentHP is the amount of health the character
currently has and the maximumHP is the amount of hit points a
fully health character could
have.
All characters can deal damage (double dealDamage();) which
calculated how much damage they will
inflict on another player using their abilities and wepaons or
spells. and they can receive damage
(void receiveDamage(double amount);) A character is alive
(boolean isAlive()) when
the currentHp is greater than zero. A character can also heal
(void addHealth(double newAmount))
this adds the amount of healing up to maximum HP.
There are two types of Characters. Mages and Warriors.
1.1.1 Mage
Mages have a spell book, and they also have mana (which is the
amount of spell power they have). Mana can be between a
minimum of 0 and a maximum of 100. They also regenerate
mana (and hp's) if they do nothing at an amount (for the sake of
this example we can fix this to 25 mana units and 10 hp's and
will continue to accumulate as long as the magician rests (which
they can do during a battle by doing nothing for a turn).
Mages can add spells to their spell book (void addSpell(Spell
newSpell)). They can also throw their spell book away and get
a new one (void newSpellBook()).
Most importantly when in battle and the dealDamage method is
called it will returns how much damage is done to the enemy by
the mage. In the case of the mage, the mage has three options
firstly if the mage's mana is < 10 they will rest for the turn
(which does/returns zero damage). If the mage is < 30 hp's they
will stop and cast a random healing spell from their spell book.
If they have no healing spells they should rest which will give
them back 10 hps (as well as the mana regeneration) Else the
mage will attack by selecting a random TargetedSpell spell from
their spellbook and casting that return the damage it inflicts on
the target. Note that while dealing damage the sound the spell
makes is printed.
1.1.12 Warrior
Warriors are simpler they can have up to 5 weapons and are
born with a weapon in their hand. Like the mage they will deal
damage but they are unencumbered by magic and have a simpler
algorithm for fighting. Simply they pick a random weapon and
try to kill the enemy with it. Again the sound the weapon makes
is printed.
1.2 Effector
All spells and weapons affect a character. They have a name, a
minimum effect and a maximum effect. When an effect occurs
it is randomly selected between minimum and maximum effect.
All Effector's make a sound.
1.2.1 Spell
Spells are a type of effector. There are two types of spells
"HealingSpell" and "TargetedSpell" They define the different
types of spells that can be cast. Each of these types have
subclasses which are the Fireball, IceStorm and MinorHealing
1.2.1.1 TargetedSpell
For the sake of the exercise there should be at least 2 types of
TargetedSpells
Fireball
· Mana Cost 15
· Minimum Effect 40
· Maximum Effect 50
· Sound:Crackle Boom
IceStorm
· Mana Cost 20
· Minimum Effect 50
· Maximum Effect 60
· Sound:Chatter Boom
1.2.1.2 Healing
For the sake of the exercise there should be at least 1 types of
Healing Spell
MinorHealing
· Mana Cost 20
· Minimum Effect 40
· Maximum Effect 40
· Sound:Warble
1.2.2 Weapons
Weapons are another type of effector. All weapons have a
calculateDamage method to return the amount of damage the
weapon did between minimum and maximum effect.
For the sake of the exercise there should be at least two types
of weapon.
Axe
· Minimum Effect 15
· Maximum Effect 25
· Sound:Clink
Sword
· Minimum Effect 1
· Maximum Effect 50
· Sound:Wosh
1.3 Spellbook
The mage holds a spellbook which each page contains one
spell. Spellbooks contain both targetedSpells and Healing
spells. Spellbook has two methods (getTargetedSpells and
getHealingSpells) which returns a list of all the spells of that
type that are in the spell book. This is necessary so that the
mage can choose from either offensive or defensive spells
during the fight. To save you time this has been supplied to you
below.
1.4 Log
To keep a record of these epic battles there is a centralized
logging program for your fight. This class will either output to
the screen or to the disk depending on whether a method is
called. This class is supplied to you in skeleton below with only
the screen output working. You should extend this to allow the
HaveBattle method call write to disk or write to screen methods.
2 Your Mission
You are to take the description above and build the software to
implement the code to run the battle.
2.1 Requirements
Here are a list of requirements for your assignment.
· HaveBattle class must work. This is designed to use your
code.
· You must use inheritance where appropriate
· Push as much code up the inheritance structure as possible.
· You must use abstract where appropriate
· You should write some testing to make sure your assignment
works. You don't need to use junit however, whatever you write
should do reasonable job of making sure your assignment
works.
· A static method for generating a random number in a range is
supplied in the effector class skeleton. Feel free to use it.
· Only import the needed classes in each class
· Jpg image of your inheritance diagram called inheritance.jpg
included in the project
· txt file with your testing outline called testing.txt
· Class javadoc, Method javadoc, Instance javadoc and method
body commenting
· 16 classes should be included in your workspace. Don't panic
quite a few of them are only a few lines of code.
· Whatever you submit it should be compilable and runnable
even if it doesn't do everything that is required.
2.2 Suggested Order
This is a suggested approach to doing your assignment.
1. Create the packages (base package of unisa.pf.assign02.
then subpackages base, characters, spells,
2. testing, util and weapons).
3. Draw up the inheritance structure using this document and
supplied code to give you clues.
4. Put the supplied code into classes into the appropriate
packages.
5. Get the code commented and tested
6. Create the missing files and get it to compile (even with
empty classes).
7. Get the code commented and tested
8. Work on the log.java file (this will work independantly).
9. Get the code commented and tested
10. Write missing methods so that the HaveBattle class will
compile.
11. Get the code commented and tested
12. Get the program so it will call dealDamage and
receiveDamage.
13. Get the code commented and tested
14. Get the dealDamage and receiveDamage methods to work
(trickiest part)
15. Get the code commented and tested
2.3 Testing
You are to write a test outline of what you would test and how
you would test it in your program. It is not necessary to code
this just include a textfile (testing.txt). You should put in
sections on each class and under each class each method and the
test cases you would test. You do not need to do junit testing
for this assignment (I think you have enough to do without
writing all that).
3.0 Marking
This assignment will be marked on the
following independant criteria
Number of Marks
Description
10
Commenting
10
Style
5
Inheritance Diagram
15
Inheritance Code
15
Logging System Implementation
10
Other Code
20
doBattle and receiveDamage methods
15
Testing Design
If the code doesn't compile/work the maximum marks you can
receive is 40%
4.0 Supplied Code
Here is some code to get you going. You must use this code
and you should also fully comment the code.
4.1 Spellbook.java
(this code only needs commenting)
package unisa.pf.assign02.spells;
import java.util.Arrays;
import java.util.LinkedList;
public class SpellBook {
LinkedList pages = new LinkedList();
public Spell[] getTargetedSpells() {
LinkedList offensive = new LinkedList();
for (Spell i: pages) {
if(i instanceof TargetedSpell) {
offensive.add(i);
}
}
Spell[] returnVal = new Spell[offensive.size()];
for(int i=0;i<returnVal.length;i++) {
returnVal[i] = offensive.get(i);
}
return returnVal;
}
public Spell[] getHealingSpells() {
LinkedList healing = new LinkedList();
for (Spell i: pages) {
if(i instanceof HealingSpell) {
healing.add(i);
}
}
Spell[] returnVal = new Spell[healing.size()];
for(int i=0;i<returnVal.length;i++) {
returnVal[i] = healing.get(i);
}
return returnVal;
}
public void addSpell(Spell newSpell) {
pages.add(newSpell);
}
public Spell getSpell(int location) {
return pages.get(location);
}
public int length() {
return pages.size();
}
@Override
public String toString() {
String spells = "SpellBook [";
for (int i=0;i<pages.size();i++) {
spells += pages.get(i).toString();
}
return spells + "]";
}
}
4.2 HaveBattle.java
(this code only needs commenting)
package unisa.pf.assign02.testing;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import unisa.pf.assign02.base.Effector;
import unisa.pf.assign02.characters.Mage;
import unisa.pf.assign02.characters.CharacterClass;
import unisa.pf.assign02.characters.Warrior;
import unisa.pf.assign02.spells.Spell;
import unisa.pf.assign02.spells.MinorHealing;
import unisa.pf.assign02.spells.TargetedSpell;
import unisa.pf.assign02.spells.Fireball;
import unisa.pf.assign02.spells.HealingSpell;
import unisa.pf.assign02.spells.IceStorm;
import unisa.pf.assign02.weapons.Weapon;
import unisa.pf.assign02.weapons.Axe;
import unisa.pf.assign02.weapons.Sword;
import unisa.pf.assign02.util.Log;
public class HaveBattle {
public static void main(String[] args) {
int numberOfBattles = 5;
int numberMageWins = 0;
int numberWarriorWins = 0;
int draw = 0;
for (int i=0;i<numberOfBattles;i++) {
Log.println("****** Round "+(i+1)+"
********");
CharacterClass mage = new Mage("Macros the
Black Ver("+i+")",120);
((Mage)mage).addSpell(new Fireball());
((Mage)mage).addSpell(new IceStorm());
((Mage)mage).addSpell(new
MinorHealing(mage));
CharacterClass warrior = new Warrior("Ashen-
Shugar Ver("+i+")",240,new Axe());
((Warrior)warrior).addWeapon(new Sword());
while(mage.isAlive() && warrior.isAlive()) {
Log.println("+++New Turn+++");
Log.print("[[Mage Turn]]");
warrior.receiveDamage(mage.dealDamage());
Log.println("");
Log.print("[[Warrior Turn]]");
mage.receiveDamage(warrior.dealDamage());
Log.println("n");
}
if (mage.isAlive()) {
Log.println("Mage "+mage.getName()+"
Wins n[["+mage+"]]");
numberMageWins++;
} else if (warrior.isAlive()){
Log.println("Warrior
"+warrior.getName()+" Wins n[["+warrior+"]]");
numberWarriorWins++;
} else {
Log.println("Killed Each Other No One
WinsnDead:"+mage+"nDead:"+warrior);
draw++;
}
Log.println("**************************************
**************nnn");
}
Log.println("Mage :"+numberMageWins);
Log.println("Warrior :"+numberWarriorWins);
Log.println("Killed Each Other :"+draw);
Log.println("nn");
Log.println("Debug Structure Code Below");
//This code will force you to get the structure right.
CharacterClass x = new Warrior("Mym",999,new
Sword());
CharacterClass y = new Mage("Atoning
Unifex",9999999);
Warrior z = new Warrior("Falameezar-aziz-
Sulmonmee",900,new Sword());
Mage w = new Mage("Jon-Tom",300);
Mage u = new Mage("Mondain",300);
Spell s1 = new MinorHealing(y);
HealingSpell s2 = new MinorHealing(y);
TargetedSpell s3 = new IceStorm();
Spell s4 = new IceStorm();
Effector e1 = new Sword();
Effector e2 = new IceStorm();
Weapon w1 = new Axe();
x.addHealth(99);
z.addWeapon(new Axe());
x.isAlive();
Log.println("X Deal Damage");
x.dealDamage();
Log.println("nX Receive Damage");
x.receiveDamage(999);
Log.println("nW Receive Damage");
w.receiveDamage(999);
w.dealDamage();
s4.getMinimumImpact();
s4.getMaximumImpact();
s4.getManaCost();
Log.close();
}
}
4.3 Log.java
(this code needs additional code written)
package unisa.pf.assign02.util;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
public class Log {
private static FileWriter log = null;
private static boolean fileOut = false;
static {
//CODE HERE.
//THINK OF THIS AS A CONSTRUCTOR FOR STATIC
VARIABLES
}
public static void println(String output) {
print(output+"n");
}
public static void print(String output) {
if (fileOut) {
//CODE HERE
} else {
System.out.print(output);
}
}
public static void close() {
try {
log.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void setFileOut() {
fileOut = true;
}
public static void setConsoleOut() {
fileOut = false;
}
}
4.4 Effector.java
(this code needs additional code written)
package unisa.pf.assign02.base;
import java.util.Random;
import unisa.pf.assign02.util.Log;
abstract public class Effector {
//you need to write additional code/instance variables
static public double randomNumberInRange(double start,
double finish) {
Random r1 = new Random();
r1.nextGaussian();
return (Math.abs(r1.nextInt())%((finish+1)-
start))+start;
}
}
5 Example Output
****** Round 1 ********
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 51.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 51 to 41. Remaining
hp is 199
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 17.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(0) uses armor to reduce damage from 17 to 17.
Remaining hp is 103
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 56.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 56 to 46. Remaining
hp is 153
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 37.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(0) uses armor to reduce damage from 37 to 37.
Remaining hp is 66
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 42.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 42 to 32. Remaining
hp is 121
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 23.0 hp of damage:][Sound::Clink]Macros the Black Ver(0)
uses armor to reduce damage from 23 to 23. Remaining hp is 43
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 40.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 40 to 30. Remaining
hp is 91
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(0)
uses armor to reduce damage from 20 to 20. Remaining hp is 23
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 23 HP to 63 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(0) uses armor to reduce
damage from 0 to 0. Remaining hp is 91
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(0)
uses armor to reduce damage from 19 to 19. Remaining hp is 44
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 53.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 53 to 43. Remaining
hp is 48
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 15.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(0) uses armor to reduce damage from 15 to 15.
Remaining hp is 29
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(0)
uses armor to reduce damage from 0 to 0. Remaining hp is 48
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 17.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(0) uses armor to reduce damage from 17 to 17.
Remaining hp is 22
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 22 HP to 62 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(0) uses armor to reduce
damage from 0 to 0. Remaining hp is 48
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(0)
uses armor to reduce damage from 18 to 18. Remaining hp is 44
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(0) uses armor to reduce damage from 43 to 33. Remaining
hp is 15
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 9.0 hp of damage:][Sound::Wosh]Macros the
Black Ver(0) uses armor to reduce damage from 9 to 9.
Remaining hp is 35
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(0)
uses armor to reduce damage from 0 to 0. Remaining hp is 15
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 50.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(0) uses armor to reduce damage from 50 to 50.
Remaining hp is 0
Warrior Ashen-Shugar Ver(0) Wins
[[Warrior [weapons=[Axe [soundItMakes()=:Clink,
getName()=Weapon:Axe, getMinimumImpact()=15.0,
getMaximumImpact()=25.0], Sword [soundItMakes()=:Wosh,
getName()=Weapon:Sword, getMinimumImpact()=1.0,
getMaximumImpact()=50.0], null, null, null],
numberOfWeapons=2]]]
****************************************************
****** Round 2 ********
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 48.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 48 to 38. Remaining
hp is 202
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 20 to 20. Remaining hp is
100
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 56.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 56 to 46. Remaining
hp is 156
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 20.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(1) uses armor to reduce damage from 20 to 20.
Remaining hp is 80
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 44.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 44 to 34. Remaining
hp is 122
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 18 to 18. Remaining hp is 62
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 43 to 33. Remaining
hp is 89
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 22 to 22. Remaining hp is 40
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 43 to 33. Remaining
hp is 56
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 18 to 18. Remaining hp is 22
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 22 HP to 62 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(1) uses armor to reduce
damage from 0 to 0. Remaining hp is 56
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 32.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(1) uses armor to reduce damage from 32 to 32.
Remaining hp is 30
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 41.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(1) uses armor to reduce damage from 41 to 31. Remaining
hp is 25
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 22 to 22. Remaining hp is 8
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(1)
uses armor to reduce damage from 0 to 0. Remaining hp is 25
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1)
uses armor to reduce damage from 22 to 22. Remaining hp is 0
Warrior Ashen-Shugar Ver(1) Wins
[[Warrior [weapons=[Axe [soundItMakes()=:Clink,
getName()=Weapon:Axe, getMinimumImpact()=15.0,
getMaximumImpact()=25.0], Sword [soundItMakes()=:Wosh,
getName()=Weapon:Sword, getMinimumImpact()=1.0,
getMaximumImpact()=50.0], null, null, null],
numberOfWeapons=2]]]
****************************************************
****** Round 3 ********
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 47 to 37. Remaining
hp is 203
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 3.0 hp of damage:][Sound::Wosh]Macros the
Black Ver(2) uses armor to reduce damage from 3 to 3.
Remaining hp is 117
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 46.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 46 to 36. Remaining
hp is 167
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 16.0 hp of damage:][Sound::Clink]Macros the Black Ver(2)
uses armor to reduce damage from 16 to 16. Remaining hp is
101
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 59.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 59 to 49. Remaining
hp is 118
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 8.0 hp of damage:][Sound::Wosh]Macros the
Black Ver(2) uses armor to reduce damage from 8 to 8.
Remaining hp is 93
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 55.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 55 to 45. Remaining
hp is 73
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 26.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(2) uses armor to reduce damage from 26 to 26.
Remaining hp is 67
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 57.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 57 to 47. Remaining
hp is 26
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(2)
uses armor to reduce damage from 19 to 19. Remaining hp is 48
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 55.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(2) uses armor to reduce damage from 55 to 45. Remaining
hp is 0
[[Warrior Turn]][Warrior Action: Warrior has died and chooses
to skip turn]
Macros the Black Ver(2) uses armor to reduce damage from 0 to
0. Remaining hp is 48
Mage Macros the Black Ver(2) Wins
[[Mage [sb=SpellBook [Fireball [name=Spell:Fireball,
manaCost=15.0, minimumImpact=40.0,
maximumImpact=50.0]IceStorm [name=Spell:IceStorm,
manaCost=20.0, minimumImpact=50.0,
maximumImpact=60.0]Minor Healing [name=Spell:Minor
Healing, manaCost=10.0, minimumImpact=40.0,
maximumImpact=40.0]], mana=0.0, getName()=Macros the
Black Ver(2), getHp()=48.0, getMaxHp()=120.0]]]
****************************************************
****** Round 4 ********
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 52.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 52 to 42. Remaining
hp is 198
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 14.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(3) uses armor to reduce damage from 14 to 14.
Remaining hp is 106
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 45 to 35. Remaining
hp is 163
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 10.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(3) uses armor to reduce damage from 10 to 10.
Remaining hp is 96
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 59.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 59 to 49. Remaining
hp is 114
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 3.0 hp of damage:][Sound::Wosh]Macros the
Black Ver(3) uses armor to reduce damage from 3 to 3.
Remaining hp is 93
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 43 to 33. Remaining
hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 23.0 hp of damage:][Sound::Clink]Macros the Black Ver(3)
uses armor to reduce damage from 23 to 23. Remaining hp is 70
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 45 to 35. Remaining
hp is 46
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 26.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(3) uses armor to reduce damage from 26 to 26.
Remaining hp is 44
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 50.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 50 to 40. Remaining
hp is 6
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 25.0 hp of damage:][Sound::Clink]Macros the Black Ver(3)
uses armor to reduce damage from 25 to 25. Remaining hp is 19
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(3)
uses armor to reduce damage from 0 to 0. Remaining hp is 6
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 15.0 hp of damage:][Sound::Clink]Macros the Black Ver(3)
uses armor to reduce damage from 15 to 15. Remaining hp is 14
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 14 HP to 54 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(3) uses armor to reduce
damage from 0 to 0. Remaining hp is 6
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 16.0 hp of damage:][Sound::Clink]Macros the Black Ver(3)
uses armor to reduce damage from 16 to 16. Remaining hp is 38
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 50.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(3) uses armor to reduce damage from 50 to 40. Remaining
hp is 0
[[Warrior Turn]][Warrior Action: Warrior has died and chooses
to skip turn]
Macros the Black Ver(3) uses armor to reduce damage from 0 to
0. Remaining hp is 38
Mage Macros the Black Ver(3) Wins
[[Mage [sb=SpellBook [Fireball [name=Spell:Fireball,
manaCost=15.0, minimumImpact=40.0,
maximumImpact=50.0]IceStorm [name=Spell:IceStorm,
manaCost=20.0, minimumImpact=50.0,
maximumImpact=60.0]Minor Healing [name=Spell:Minor
Healing, manaCost=10.0, minimumImpact=40.0,
maximumImpact=40.0]], mana=0.0, getName()=Macros the
Black Ver(3), getHp()=38.0, getMaxHp()=120.0]]]
****************************************************
****** Round 5 ********
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 53.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 53 to 43. Remaining
hp is 197
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 49.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 49 to 49.
Remaining hp is 71
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 47 to 37. Remaining
hp is 160
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 42.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 42 to 42.
Remaining hp is 29
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 29 HP to 69 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 160
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 50.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 50 to 50.
Remaining hp is 19
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 19 HP to 59 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 160
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 22 to 22. Remaining hp is 37
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 41.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 41 to 31. Remaining
hp is 129
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 20 to 20. Remaining hp is 17
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 17 HP to 57 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 129
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 18 to 18. Remaining hp is 39
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
for 58.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 58 to 48. Remaining
hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 25.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 25 to 25. Remaining hp is 14
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4)
uses armor to reduce damage from 0 to 0. Remaining hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 18.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 18 to 18.
Remaining hp is 6
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 6 HP to 46 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 19 to 19. Remaining hp is 27
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 27 HP to 67 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 24.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 24 to 24. Remaining hp is 43
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4)
uses armor to reduce damage from 0 to 0. Remaining hp is 81
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 15.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 15 to 15. Remaining hp is 38
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 47 to 37. Remaining
hp is 44
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 17.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 17 to 17. Remaining hp is 21
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 21 HP to 61 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 44
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 15.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 15 to 15.
Remaining hp is 46
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4)
uses armor to reduce damage from 0 to 0. Remaining hp is 44
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 10.0 hp of damage:][Sound::Wosh]Macros
the Black Ver(4) uses armor to reduce damage from 10 to 10.
Remaining hp is 46
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 45 to 35. Remaining
hp is 9
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 24.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 24 to 24. Remaining hp is 22
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Health -)Health Changed
From 22 HP to 62 HP
with Spell:Minor Healing for 0 hp of damage:
Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce
damage from 0 to 0. Remaining hp is 9
[[Warrior Turn]][Warrior Action: Attacks ->with
Weapon:Sword for 1.0 hp of damage:][Sound::Wosh]Macros the
Black Ver(4) uses armor to reduce damage from 1 to 1.
Remaining hp is 61
+++New Turn+++
[[Mage Turn]]Magician Action: Regen Mana -)Mana
Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4)
uses armor to reduce damage from 0 to 0. Remaining hp is 9
[[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(4)
uses armor to reduce damage from 19 to 19. Remaining hp is 52
+++New Turn+++
[[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
for 49.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
Ver(4) uses armor to reduce damage from 49 to 39. Remaining
hp is 0
[[Warrior Turn]][Warrior Action: Warrior has died and chooses
to skip turn]
Macros the Black Ver(4) uses armor to reduce damage from 0 to
0. Remaining hp is 52
Mage Macros the Black Ver(4) Wins
[[Mage [sb=SpellBook [Fireball [name=Spell:Fireball,
manaCost=15.0, minimumImpact=40.0,
maximumImpact=50.0]IceStorm [name=Spell:IceStorm,
manaCost=20.0, minimumImpact=50.0,
maximumImpact=60.0]Minor Healing [name=Spell:Minor
Healing, manaCost=10.0, minimumImpact=40.0,
maximumImpact=40.0]], mana=15.0, getName()=Macros the
Black Ver(4), getHp()=52.0, getMaxHp()=120.0]]]
****************************************************
Mage :3
Warrior :2
Killed Each Other :0
Debug Structure Code Below
X Deal Damage
[Warrior Action: Attacks ->with Weapon:Sword for 32.0 hp of
damage:][Sound::Wosh]
X Receive Damage
Mym uses armor to reduce damage from 999 to 989. Remaining
hp is 10
W Receive Damage
Jon-Tom uses armor to reduce damage from 999 to 999.
Remaining hp is 0Magician Action: Mage has died and chooses
to skip turn

More Related Content

Similar to 1.0 DescriptionThis program simulates the battle between two ch.docx

Important notes· NOTE it is usually fine and often encouraged i.docx
Important notes· NOTE it is usually fine and often encouraged i.docxImportant notes· NOTE it is usually fine and often encouraged i.docx
Important notes· NOTE it is usually fine and often encouraged i.docx
wilcockiris
 

Similar to 1.0 DescriptionThis program simulates the battle between two ch.docx (20)

Recursion vs. Iteration: Code Efficiency & Structure
Recursion vs. Iteration: Code Efficiency & StructureRecursion vs. Iteration: Code Efficiency & Structure
Recursion vs. Iteration: Code Efficiency & Structure
 
Cs in science_guides
Cs in science_guidesCs in science_guides
Cs in science_guides
 
Important notes· NOTE it is usually fine and often encouraged i.docx
Important notes· NOTE it is usually fine and often encouraged i.docxImportant notes· NOTE it is usually fine and often encouraged i.docx
Important notes· NOTE it is usually fine and often encouraged i.docx
 
Java unit 11
Java unit 11Java unit 11
Java unit 11
 
Comp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source codeComp 122 lab 6 lab report and source code
Comp 122 lab 6 lab report and source code
 
Practical unit testing tips
Practical unit testing tipsPractical unit testing tips
Practical unit testing tips
 
Unit 1 of java part 2 basic introduction
Unit 1 of java part 2 basic introduction Unit 1 of java part 2 basic introduction
Unit 1 of java part 2 basic introduction
 
pyton Notes9
pyton Notes9pyton Notes9
pyton Notes9
 
Java Tutorial | My Heart
Java Tutorial | My HeartJava Tutorial | My Heart
Java Tutorial | My Heart
 
Introduction to Java programming - Java tutorial for beginners to teach Java ...
Introduction to Java programming - Java tutorial for beginners to teach Java ...Introduction to Java programming - Java tutorial for beginners to teach Java ...
Introduction to Java programming - Java tutorial for beginners to teach Java ...
 
Hello. I was wondering if I could get some help on this C programmin.pdf
Hello. I was wondering if I could get some help on this C programmin.pdfHello. I was wondering if I could get some help on this C programmin.pdf
Hello. I was wondering if I could get some help on this C programmin.pdf
 
Metaprogramming and Folly
Metaprogramming and FollyMetaprogramming and Folly
Metaprogramming and Folly
 
Bt0074 oops with java2
Bt0074 oops with java2Bt0074 oops with java2
Bt0074 oops with java2
 
Java tut1
Java tut1Java tut1
Java tut1
 
Java tut1 Coderdojo Cahersiveen
Java tut1 Coderdojo CahersiveenJava tut1 Coderdojo Cahersiveen
Java tut1 Coderdojo Cahersiveen
 
Java tut1
Java tut1Java tut1
Java tut1
 
Javatut1
Javatut1 Javatut1
Javatut1
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Java_Tutorial_Introduction_to_Core_java.ppt
Java_Tutorial_Introduction_to_Core_java.pptJava_Tutorial_Introduction_to_Core_java.ppt
Java_Tutorial_Introduction_to_Core_java.ppt
 
Easymock Tutorial
Easymock TutorialEasymock Tutorial
Easymock Tutorial
 

More from jackiewalcutt

Briefly summarize and analyze two primary sources, identifying their.docx
Briefly summarize and analyze two primary sources, identifying their.docxBriefly summarize and analyze two primary sources, identifying their.docx
Briefly summarize and analyze two primary sources, identifying their.docx
jackiewalcutt
 
Briefly describe how to deploy a Continuous Improvement effort.W.docx
Briefly describe how to deploy a Continuous Improvement effort.W.docxBriefly describe how to deploy a Continuous Improvement effort.W.docx
Briefly describe how to deploy a Continuous Improvement effort.W.docx
jackiewalcutt
 

More from jackiewalcutt (20)

briefly summarize how the Electoral College works. Explain some of t.docx
briefly summarize how the Electoral College works. Explain some of t.docxbriefly summarize how the Electoral College works. Explain some of t.docx
briefly summarize how the Electoral College works. Explain some of t.docx
 
Briefly summarize and analyze two primary sources, identifying their.docx
Briefly summarize and analyze two primary sources, identifying their.docxBriefly summarize and analyze two primary sources, identifying their.docx
Briefly summarize and analyze two primary sources, identifying their.docx
 
Briefly respond to the following questions. Use facts and examples t.docx
Briefly respond to the following questions. Use facts and examples t.docxBriefly respond to the following questions. Use facts and examples t.docx
Briefly respond to the following questions. Use facts and examples t.docx
 
Briefly in your own words describe the distinction between explicit .docx
Briefly in your own words describe the distinction between explicit .docxBriefly in your own words describe the distinction between explicit .docx
Briefly in your own words describe the distinction between explicit .docx
 
Briefly explain   Victoria Australia Covid19 update and impact.docx
Briefly explain   Victoria Australia Covid19 update and impact.docxBriefly explain   Victoria Australia Covid19 update and impact.docx
Briefly explain   Victoria Australia Covid19 update and impact.docx
 
Briefly introduce the détente policies of the early 1970s, and des.docx
Briefly introduce the détente policies of the early 1970s, and des.docxBriefly introduce the détente policies of the early 1970s, and des.docx
Briefly introduce the détente policies of the early 1970s, and des.docx
 
Briefly explain the role of information systems in an organization.docx
Briefly explain the role of information systems in an organization.docxBriefly explain the role of information systems in an organization.docx
Briefly explain the role of information systems in an organization.docx
 
briefly describe, in 2-3 pages, the problemissue and the proble.docx
briefly describe, in 2-3 pages, the problemissue and the proble.docxbriefly describe, in 2-3 pages, the problemissue and the proble.docx
briefly describe, in 2-3 pages, the problemissue and the proble.docx
 
Briefly explain the mission of the OSH Act. What is the rationale be.docx
Briefly explain the mission of the OSH Act. What is the rationale be.docxBriefly explain the mission of the OSH Act. What is the rationale be.docx
Briefly explain the mission of the OSH Act. What is the rationale be.docx
 
Briefly discuss the various organizational approaches to managing .docx
Briefly discuss the various organizational approaches to managing .docxBriefly discuss the various organizational approaches to managing .docx
Briefly discuss the various organizational approaches to managing .docx
 
Briefly explain the identified security issues during Risk Assessmen.docx
Briefly explain the identified security issues during Risk Assessmen.docxBriefly explain the identified security issues during Risk Assessmen.docx
Briefly explain the identified security issues during Risk Assessmen.docx
 
Briefly discuss some KSAs for Fighting Cybercrime and submit in a wo.docx
Briefly discuss some KSAs for Fighting Cybercrime and submit in a wo.docxBriefly discuss some KSAs for Fighting Cybercrime and submit in a wo.docx
Briefly discuss some KSAs for Fighting Cybercrime and submit in a wo.docx
 
Briefly describe what a monopoly is and give an example using the ch.docx
Briefly describe what a monopoly is and give an example using the ch.docxBriefly describe what a monopoly is and give an example using the ch.docx
Briefly describe what a monopoly is and give an example using the ch.docx
 
Briefly describe the spread of industry throughout Europe and into.docx
Briefly describe the spread of industry throughout Europe and into.docxBriefly describe the spread of industry throughout Europe and into.docx
Briefly describe the spread of industry throughout Europe and into.docx
 
Briefly describe the path of food through the digestive system and e.docx
Briefly describe the path of food through the digestive system and e.docxBriefly describe the path of food through the digestive system and e.docx
Briefly describe the path of food through the digestive system and e.docx
 
Briefly describe the different parenting styles discussed in this we.docx
Briefly describe the different parenting styles discussed in this we.docxBriefly describe the different parenting styles discussed in this we.docx
Briefly describe the different parenting styles discussed in this we.docx
 
Briefly describe how the BIOS boots or starts the computer and.docx
Briefly describe how the BIOS boots or starts the computer and.docxBriefly describe how the BIOS boots or starts the computer and.docx
Briefly describe how the BIOS boots or starts the computer and.docx
 
Briefly describe how to deploy a Continuous Improvement effort.W.docx
Briefly describe how to deploy a Continuous Improvement effort.W.docxBriefly describe how to deploy a Continuous Improvement effort.W.docx
Briefly describe how to deploy a Continuous Improvement effort.W.docx
 
briefly define democracy and evaluate in detail THREE of.docx
briefly define democracy and evaluate in detail THREE of.docxbriefly define democracy and evaluate in detail THREE of.docx
briefly define democracy and evaluate in detail THREE of.docx
 
Briefly define, listcontrast, identify the significance of, or .docx
Briefly define, listcontrast, identify the significance of, or .docxBriefly define, listcontrast, identify the significance of, or .docx
Briefly define, listcontrast, identify the significance of, or .docx
 

Recently uploaded

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
CaitlinCummins3
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
EADTU
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
中 央社
 

Recently uploaded (20)

SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...Andreas Schleicher presents at the launch of What does child empowerment mean...
Andreas Schleicher presents at the launch of What does child empowerment mean...
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
Supporting Newcomer Multilingual Learners
Supporting Newcomer  Multilingual LearnersSupporting Newcomer  Multilingual Learners
Supporting Newcomer Multilingual Learners
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"Mattingly "AI and Prompt Design: LLMs with NER"
Mattingly "AI and Prompt Design: LLMs with NER"
 
How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17How To Create Editable Tree View in Odoo 17
How To Create Editable Tree View in Odoo 17
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)ESSENTIAL of (CS/IT/IS) class 07 (Networks)
ESSENTIAL of (CS/IT/IS) class 07 (Networks)
 
Major project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategiesMajor project report on Tata Motors and its marketing strategies
Major project report on Tata Motors and its marketing strategies
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of TransportBasic Civil Engineering notes on Transportation Engineering & Modes of Transport
Basic Civil Engineering notes on Transportation Engineering & Modes of Transport
 
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinhĐề tieng anh thpt 2024 danh cho cac ban hoc sinh
Đề tieng anh thpt 2024 danh cho cac ban hoc sinh
 
Graduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptxGraduate Outcomes Presentation Slides - English (v3).pptx
Graduate Outcomes Presentation Slides - English (v3).pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUMDEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
DEMONSTRATION LESSON IN ENGLISH 4 MATATAG CURRICULUM
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Improved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio AppImproved Approval Flow in Odoo 17 Studio App
Improved Approval Flow in Odoo 17 Studio App
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文會考英文
 

1.0 DescriptionThis program simulates the battle between two ch.docx

  • 1. 1.0 Description: This program simulates the battle between two character classes. In the HaveBattle class we are having a battle between a Mage and a Warrior. You are to write the supporting code using inheritance and a touch of polymorphism. 1.1 Characters There are two types of CharacterClasses, Warriors and Mages. Each CharacterClass has a currentHP, maxHP. Warriors also have an implicit armor that offsets 10 damage. CurrentHP is the amount of health the character currently has and the maximumHP is the amount of hit points a fully health character could have. All characters can deal damage (double dealDamage();) which calculated how much damage they will inflict on another player using their abilities and wepaons or spells. and they can receive damage (void receiveDamage(double amount);) A character is alive (boolean isAlive()) when the currentHp is greater than zero. A character can also heal (void addHealth(double newAmount)) this adds the amount of healing up to maximum HP. There are two types of Characters. Mages and Warriors. 1.1.1 Mage Mages have a spell book, and they also have mana (which is the amount of spell power they have). Mana can be between a minimum of 0 and a maximum of 100. They also regenerate mana (and hp's) if they do nothing at an amount (for the sake of this example we can fix this to 25 mana units and 10 hp's and will continue to accumulate as long as the magician rests (which they can do during a battle by doing nothing for a turn). Mages can add spells to their spell book (void addSpell(Spell
  • 2. newSpell)). They can also throw their spell book away and get a new one (void newSpellBook()). Most importantly when in battle and the dealDamage method is called it will returns how much damage is done to the enemy by the mage. In the case of the mage, the mage has three options firstly if the mage's mana is < 10 they will rest for the turn (which does/returns zero damage). If the mage is < 30 hp's they will stop and cast a random healing spell from their spell book. If they have no healing spells they should rest which will give them back 10 hps (as well as the mana regeneration) Else the mage will attack by selecting a random TargetedSpell spell from their spellbook and casting that return the damage it inflicts on the target. Note that while dealing damage the sound the spell makes is printed. 1.1.12 Warrior Warriors are simpler they can have up to 5 weapons and are born with a weapon in their hand. Like the mage they will deal damage but they are unencumbered by magic and have a simpler algorithm for fighting. Simply they pick a random weapon and try to kill the enemy with it. Again the sound the weapon makes is printed. 1.2 Effector All spells and weapons affect a character. They have a name, a minimum effect and a maximum effect. When an effect occurs it is randomly selected between minimum and maximum effect. All Effector's make a sound. 1.2.1 Spell Spells are a type of effector. There are two types of spells "HealingSpell" and "TargetedSpell" They define the different types of spells that can be cast. Each of these types have subclasses which are the Fireball, IceStorm and MinorHealing 1.2.1.1 TargetedSpell For the sake of the exercise there should be at least 2 types of TargetedSpells Fireball · Mana Cost 15
  • 3. · Minimum Effect 40 · Maximum Effect 50 · Sound:Crackle Boom IceStorm · Mana Cost 20 · Minimum Effect 50 · Maximum Effect 60 · Sound:Chatter Boom 1.2.1.2 Healing For the sake of the exercise there should be at least 1 types of Healing Spell MinorHealing · Mana Cost 20 · Minimum Effect 40 · Maximum Effect 40 · Sound:Warble 1.2.2 Weapons Weapons are another type of effector. All weapons have a calculateDamage method to return the amount of damage the weapon did between minimum and maximum effect. For the sake of the exercise there should be at least two types of weapon. Axe · Minimum Effect 15 · Maximum Effect 25 · Sound:Clink Sword · Minimum Effect 1 · Maximum Effect 50 · Sound:Wosh 1.3 Spellbook The mage holds a spellbook which each page contains one spell. Spellbooks contain both targetedSpells and Healing spells. Spellbook has two methods (getTargetedSpells and getHealingSpells) which returns a list of all the spells of that type that are in the spell book. This is necessary so that the
  • 4. mage can choose from either offensive or defensive spells during the fight. To save you time this has been supplied to you below. 1.4 Log To keep a record of these epic battles there is a centralized logging program for your fight. This class will either output to the screen or to the disk depending on whether a method is called. This class is supplied to you in skeleton below with only the screen output working. You should extend this to allow the HaveBattle method call write to disk or write to screen methods. 2 Your Mission You are to take the description above and build the software to implement the code to run the battle. 2.1 Requirements Here are a list of requirements for your assignment. · HaveBattle class must work. This is designed to use your code. · You must use inheritance where appropriate · Push as much code up the inheritance structure as possible. · You must use abstract where appropriate · You should write some testing to make sure your assignment works. You don't need to use junit however, whatever you write should do reasonable job of making sure your assignment works. · A static method for generating a random number in a range is supplied in the effector class skeleton. Feel free to use it. · Only import the needed classes in each class · Jpg image of your inheritance diagram called inheritance.jpg included in the project · txt file with your testing outline called testing.txt · Class javadoc, Method javadoc, Instance javadoc and method body commenting · 16 classes should be included in your workspace. Don't panic quite a few of them are only a few lines of code. · Whatever you submit it should be compilable and runnable even if it doesn't do everything that is required.
  • 5. 2.2 Suggested Order This is a suggested approach to doing your assignment. 1. Create the packages (base package of unisa.pf.assign02. then subpackages base, characters, spells, 2. testing, util and weapons). 3. Draw up the inheritance structure using this document and supplied code to give you clues. 4. Put the supplied code into classes into the appropriate packages. 5. Get the code commented and tested 6. Create the missing files and get it to compile (even with empty classes). 7. Get the code commented and tested 8. Work on the log.java file (this will work independantly). 9. Get the code commented and tested 10. Write missing methods so that the HaveBattle class will compile. 11. Get the code commented and tested 12. Get the program so it will call dealDamage and receiveDamage. 13. Get the code commented and tested 14. Get the dealDamage and receiveDamage methods to work (trickiest part) 15. Get the code commented and tested 2.3 Testing You are to write a test outline of what you would test and how you would test it in your program. It is not necessary to code this just include a textfile (testing.txt). You should put in sections on each class and under each class each method and the test cases you would test. You do not need to do junit testing for this assignment (I think you have enough to do without writing all that). 3.0 Marking This assignment will be marked on the following independant criteria Number of Marks
  • 6. Description 10 Commenting 10 Style 5 Inheritance Diagram 15 Inheritance Code 15 Logging System Implementation 10 Other Code 20 doBattle and receiveDamage methods 15 Testing Design If the code doesn't compile/work the maximum marks you can receive is 40% 4.0 Supplied Code Here is some code to get you going. You must use this code and you should also fully comment the code. 4.1 Spellbook.java (this code only needs commenting) package unisa.pf.assign02.spells; import java.util.Arrays; import java.util.LinkedList; public class SpellBook { LinkedList pages = new LinkedList(); public Spell[] getTargetedSpells() { LinkedList offensive = new LinkedList(); for (Spell i: pages) {
  • 7. if(i instanceof TargetedSpell) { offensive.add(i); } } Spell[] returnVal = new Spell[offensive.size()]; for(int i=0;i<returnVal.length;i++) { returnVal[i] = offensive.get(i); } return returnVal; } public Spell[] getHealingSpells() { LinkedList healing = new LinkedList(); for (Spell i: pages) { if(i instanceof HealingSpell) { healing.add(i); } } Spell[] returnVal = new Spell[healing.size()]; for(int i=0;i<returnVal.length;i++) { returnVal[i] = healing.get(i); } return returnVal; } public void addSpell(Spell newSpell) { pages.add(newSpell); }
  • 8. public Spell getSpell(int location) { return pages.get(location); } public int length() { return pages.size(); } @Override public String toString() { String spells = "SpellBook ["; for (int i=0;i<pages.size();i++) { spells += pages.get(i).toString(); } return spells + "]"; } } 4.2 HaveBattle.java (this code only needs commenting) package unisa.pf.assign02.testing; import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; import unisa.pf.assign02.base.Effector; import unisa.pf.assign02.characters.Mage; import unisa.pf.assign02.characters.CharacterClass; import unisa.pf.assign02.characters.Warrior; import unisa.pf.assign02.spells.Spell; import unisa.pf.assign02.spells.MinorHealing; import unisa.pf.assign02.spells.TargetedSpell;
  • 9. import unisa.pf.assign02.spells.Fireball; import unisa.pf.assign02.spells.HealingSpell; import unisa.pf.assign02.spells.IceStorm; import unisa.pf.assign02.weapons.Weapon; import unisa.pf.assign02.weapons.Axe; import unisa.pf.assign02.weapons.Sword; import unisa.pf.assign02.util.Log; public class HaveBattle { public static void main(String[] args) { int numberOfBattles = 5; int numberMageWins = 0; int numberWarriorWins = 0; int draw = 0; for (int i=0;i<numberOfBattles;i++) { Log.println("****** Round "+(i+1)+" ********"); CharacterClass mage = new Mage("Macros the Black Ver("+i+")",120); ((Mage)mage).addSpell(new Fireball()); ((Mage)mage).addSpell(new IceStorm()); ((Mage)mage).addSpell(new MinorHealing(mage)); CharacterClass warrior = new Warrior("Ashen- Shugar Ver("+i+")",240,new Axe()); ((Warrior)warrior).addWeapon(new Sword()); while(mage.isAlive() && warrior.isAlive()) { Log.println("+++New Turn+++"); Log.print("[[Mage Turn]]"); warrior.receiveDamage(mage.dealDamage()); Log.println(""); Log.print("[[Warrior Turn]]");
  • 10. mage.receiveDamage(warrior.dealDamage()); Log.println("n"); } if (mage.isAlive()) { Log.println("Mage "+mage.getName()+" Wins n[["+mage+"]]"); numberMageWins++; } else if (warrior.isAlive()){ Log.println("Warrior "+warrior.getName()+" Wins n[["+warrior+"]]"); numberWarriorWins++; } else { Log.println("Killed Each Other No One WinsnDead:"+mage+"nDead:"+warrior); draw++; } Log.println("************************************** **************nnn"); } Log.println("Mage :"+numberMageWins); Log.println("Warrior :"+numberWarriorWins); Log.println("Killed Each Other :"+draw); Log.println("nn"); Log.println("Debug Structure Code Below"); //This code will force you to get the structure right. CharacterClass x = new Warrior("Mym",999,new Sword()); CharacterClass y = new Mage("Atoning Unifex",9999999); Warrior z = new Warrior("Falameezar-aziz- Sulmonmee",900,new Sword());
  • 11. Mage w = new Mage("Jon-Tom",300); Mage u = new Mage("Mondain",300); Spell s1 = new MinorHealing(y); HealingSpell s2 = new MinorHealing(y); TargetedSpell s3 = new IceStorm(); Spell s4 = new IceStorm(); Effector e1 = new Sword(); Effector e2 = new IceStorm(); Weapon w1 = new Axe(); x.addHealth(99); z.addWeapon(new Axe()); x.isAlive(); Log.println("X Deal Damage"); x.dealDamage(); Log.println("nX Receive Damage"); x.receiveDamage(999); Log.println("nW Receive Damage"); w.receiveDamage(999); w.dealDamage(); s4.getMinimumImpact(); s4.getMaximumImpact(); s4.getManaCost(); Log.close(); } } 4.3 Log.java (this code needs additional code written) package unisa.pf.assign02.util; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter;
  • 12. import java.io.IOException; public class Log { private static FileWriter log = null; private static boolean fileOut = false; static { //CODE HERE. //THINK OF THIS AS A CONSTRUCTOR FOR STATIC VARIABLES } public static void println(String output) { print(output+"n"); } public static void print(String output) { if (fileOut) { //CODE HERE } else { System.out.print(output); } } public static void close() { try { log.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); }
  • 13. } public static void setFileOut() { fileOut = true; } public static void setConsoleOut() { fileOut = false; } } 4.4 Effector.java (this code needs additional code written) package unisa.pf.assign02.base; import java.util.Random; import unisa.pf.assign02.util.Log; abstract public class Effector { //you need to write additional code/instance variables static public double randomNumberInRange(double start, double finish) { Random r1 = new Random(); r1.nextGaussian(); return (Math.abs(r1.nextInt())%((finish+1)- start))+start; } } 5 Example Output ****** Round 1 ******** +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
  • 14. for 51.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 51 to 41. Remaining hp is 199 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 17.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 17 to 17. Remaining hp is 103 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 56.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 56 to 46. Remaining hp is 153 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 37.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 37 to 37. Remaining hp is 66 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 42.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 42 to 32. Remaining hp is 121 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 23.0 hp of damage:][Sound::Clink]Macros the Black Ver(0) uses armor to reduce damage from 23 to 23. Remaining hp is 43 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 40.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 40 to 30. Remaining hp is 91 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(0) uses armor to reduce damage from 20 to 20. Remaining hp is 23
  • 15. +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 23 HP to 63 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(0) uses armor to reduce damage from 0 to 0. Remaining hp is 91 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(0) uses armor to reduce damage from 19 to 19. Remaining hp is 44 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 53.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 53 to 43. Remaining hp is 48 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 15.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 15 to 15. Remaining hp is 29 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(0) uses armor to reduce damage from 0 to 0. Remaining hp is 48 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 17.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 17 to 17. Remaining hp is 22 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 22 HP to 62 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(0) uses armor to reduce damage from 0 to 0. Remaining hp is 48 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
  • 16. for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(0) uses armor to reduce damage from 18 to 18. Remaining hp is 44 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(0) uses armor to reduce damage from 43 to 33. Remaining hp is 15 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 9.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 9 to 9. Remaining hp is 35 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(0) uses armor to reduce damage from 0 to 0. Remaining hp is 15 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 50.0 hp of damage:][Sound::Wosh]Macros the Black Ver(0) uses armor to reduce damage from 50 to 50. Remaining hp is 0 Warrior Ashen-Shugar Ver(0) Wins [[Warrior [weapons=[Axe [soundItMakes()=:Clink, getName()=Weapon:Axe, getMinimumImpact()=15.0, getMaximumImpact()=25.0], Sword [soundItMakes()=:Wosh, getName()=Weapon:Sword, getMinimumImpact()=1.0, getMaximumImpact()=50.0], null, null, null], numberOfWeapons=2]]] **************************************************** ****** Round 2 ******** +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball
  • 17. for 48.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 48 to 38. Remaining hp is 202 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 20 to 20. Remaining hp is 100 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 56.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 56 to 46. Remaining hp is 156 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 20.0 hp of damage:][Sound::Wosh]Macros the Black Ver(1) uses armor to reduce damage from 20 to 20. Remaining hp is 80 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 44.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 44 to 34. Remaining hp is 122 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 18 to 18. Remaining hp is 62 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 43 to 33. Remaining hp is 89 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 22 to 22. Remaining hp is 40
  • 18. +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 43 to 33. Remaining hp is 56 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 18 to 18. Remaining hp is 22 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 22 HP to 62 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(1) uses armor to reduce damage from 0 to 0. Remaining hp is 56 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 32.0 hp of damage:][Sound::Wosh]Macros the Black Ver(1) uses armor to reduce damage from 32 to 32. Remaining hp is 30 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 41.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(1) uses armor to reduce damage from 41 to 31. Remaining hp is 25 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 22 to 22. Remaining hp is 8 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(1) uses armor to reduce damage from 0 to 0. Remaining hp is 25 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(1) uses armor to reduce damage from 22 to 22. Remaining hp is 0
  • 19. Warrior Ashen-Shugar Ver(1) Wins [[Warrior [weapons=[Axe [soundItMakes()=:Clink, getName()=Weapon:Axe, getMinimumImpact()=15.0, getMaximumImpact()=25.0], Sword [soundItMakes()=:Wosh, getName()=Weapon:Sword, getMinimumImpact()=1.0, getMaximumImpact()=50.0], null, null, null], numberOfWeapons=2]]] **************************************************** ****** Round 3 ******** +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(2) uses armor to reduce damage from 47 to 37. Remaining hp is 203 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 3.0 hp of damage:][Sound::Wosh]Macros the Black Ver(2) uses armor to reduce damage from 3 to 3. Remaining hp is 117 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 46.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(2) uses armor to reduce damage from 46 to 36. Remaining hp is 167 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 16.0 hp of damage:][Sound::Clink]Macros the Black Ver(2) uses armor to reduce damage from 16 to 16. Remaining hp is 101 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 59.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar
  • 20. Ver(2) uses armor to reduce damage from 59 to 49. Remaining hp is 118 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 8.0 hp of damage:][Sound::Wosh]Macros the Black Ver(2) uses armor to reduce damage from 8 to 8. Remaining hp is 93 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 55.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(2) uses armor to reduce damage from 55 to 45. Remaining hp is 73 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 26.0 hp of damage:][Sound::Wosh]Macros the Black Ver(2) uses armor to reduce damage from 26 to 26. Remaining hp is 67 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 57.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(2) uses armor to reduce damage from 57 to 47. Remaining hp is 26 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(2) uses armor to reduce damage from 19 to 19. Remaining hp is 48 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 55.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(2) uses armor to reduce damage from 55 to 45. Remaining hp is 0 [[Warrior Turn]][Warrior Action: Warrior has died and chooses to skip turn] Macros the Black Ver(2) uses armor to reduce damage from 0 to 0. Remaining hp is 48
  • 21. Mage Macros the Black Ver(2) Wins [[Mage [sb=SpellBook [Fireball [name=Spell:Fireball, manaCost=15.0, minimumImpact=40.0, maximumImpact=50.0]IceStorm [name=Spell:IceStorm, manaCost=20.0, minimumImpact=50.0, maximumImpact=60.0]Minor Healing [name=Spell:Minor Healing, manaCost=10.0, minimumImpact=40.0, maximumImpact=40.0]], mana=0.0, getName()=Macros the Black Ver(2), getHp()=48.0, getMaxHp()=120.0]]] **************************************************** ****** Round 4 ******** +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 52.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 52 to 42. Remaining hp is 198 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 14.0 hp of damage:][Sound::Wosh]Macros the Black Ver(3) uses armor to reduce damage from 14 to 14. Remaining hp is 106 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 45 to 35. Remaining hp is 163 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 10.0 hp of damage:][Sound::Wosh]Macros the Black Ver(3) uses armor to reduce damage from 10 to 10. Remaining hp is 96 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm
  • 22. for 59.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 59 to 49. Remaining hp is 114 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 3.0 hp of damage:][Sound::Wosh]Macros the Black Ver(3) uses armor to reduce damage from 3 to 3. Remaining hp is 93 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 43.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 43 to 33. Remaining hp is 81 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 23.0 hp of damage:][Sound::Clink]Macros the Black Ver(3) uses armor to reduce damage from 23 to 23. Remaining hp is 70 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 45 to 35. Remaining hp is 46 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 26.0 hp of damage:][Sound::Wosh]Macros the Black Ver(3) uses armor to reduce damage from 26 to 26. Remaining hp is 44 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 50.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 50 to 40. Remaining hp is 6 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 25.0 hp of damage:][Sound::Clink]Macros the Black Ver(3) uses armor to reduce damage from 25 to 25. Remaining hp is 19
  • 23. +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(3) uses armor to reduce damage from 0 to 0. Remaining hp is 6 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 15.0 hp of damage:][Sound::Clink]Macros the Black Ver(3) uses armor to reduce damage from 15 to 15. Remaining hp is 14 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 14 HP to 54 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(3) uses armor to reduce damage from 0 to 0. Remaining hp is 6 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 16.0 hp of damage:][Sound::Clink]Macros the Black Ver(3) uses armor to reduce damage from 16 to 16. Remaining hp is 38 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 50.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(3) uses armor to reduce damage from 50 to 40. Remaining hp is 0 [[Warrior Turn]][Warrior Action: Warrior has died and chooses to skip turn] Macros the Black Ver(3) uses armor to reduce damage from 0 to 0. Remaining hp is 38 Mage Macros the Black Ver(3) Wins [[Mage [sb=SpellBook [Fireball [name=Spell:Fireball, manaCost=15.0, minimumImpact=40.0, maximumImpact=50.0]IceStorm [name=Spell:IceStorm, manaCost=20.0, minimumImpact=50.0, maximumImpact=60.0]Minor Healing [name=Spell:Minor Healing, manaCost=10.0, minimumImpact=40.0, maximumImpact=40.0]], mana=0.0, getName()=Macros the
  • 24. Black Ver(3), getHp()=38.0, getMaxHp()=120.0]]] **************************************************** ****** Round 5 ******** +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 53.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 53 to 43. Remaining hp is 197 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 49.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 49 to 49. Remaining hp is 71 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 47 to 37. Remaining hp is 160 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 42.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 42 to 42. Remaining hp is 29 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 29 HP to 69 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 160 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 50.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 50 to 50. Remaining hp is 19
  • 25. +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 19 HP to 59 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 160 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 22.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 22 to 22. Remaining hp is 37 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 41.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 41 to 31. Remaining hp is 129 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 20.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 20 to 20. Remaining hp is 17 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 17 HP to 57 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 129 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 18.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 18 to 18. Remaining hp is 39 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:IceStorm for 58.0 HP of damage:][Sound::Chatter Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 58 to 48. Remaining hp is 81 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe
  • 26. for 25.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 25 to 25. Remaining hp is 14 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 81 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 18.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 18 to 18. Remaining hp is 6 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 6 HP to 46 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 81 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 19 to 19. Remaining hp is 27 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 27 HP to 67 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 81 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 24.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 24 to 24. Remaining hp is 43 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 81
  • 27. [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 15.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 15 to 15. Remaining hp is 38 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 47.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 47 to 37. Remaining hp is 44 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 17.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 17 to 17. Remaining hp is 21 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 21 HP to 61 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 44 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 15.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 15 to 15. Remaining hp is 46 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 44 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 10.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 10 to 10. Remaining hp is 46 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 45.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar
  • 28. Ver(4) uses armor to reduce damage from 45 to 35. Remaining hp is 9 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 24.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 24 to 24. Remaining hp is 22 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Health -)Health Changed From 22 HP to 62 HP with Spell:Minor Healing for 0 hp of damage: Sound[:Warble]Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 9 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Sword for 1.0 hp of damage:][Sound::Wosh]Macros the Black Ver(4) uses armor to reduce damage from 1 to 1. Remaining hp is 61 +++New Turn+++ [[Mage Turn]]Magician Action: Regen Mana -)Mana Regenerated 25.0 Health Regenerated 10.0Ashen-Shugar Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 9 [[Warrior Turn]][Warrior Action: Attacks ->with Weapon:Axe for 19.0 hp of damage:][Sound::Clink]Macros the Black Ver(4) uses armor to reduce damage from 19 to 19. Remaining hp is 52 +++New Turn+++ [[Mage Turn]][Magician Action: Attacks ->with Spell:Fireball for 49.0 HP of damage:][Sound::Crackle Boom]Ashen-Shugar Ver(4) uses armor to reduce damage from 49 to 39. Remaining hp is 0 [[Warrior Turn]][Warrior Action: Warrior has died and chooses to skip turn] Macros the Black Ver(4) uses armor to reduce damage from 0 to 0. Remaining hp is 52 Mage Macros the Black Ver(4) Wins
  • 29. [[Mage [sb=SpellBook [Fireball [name=Spell:Fireball, manaCost=15.0, minimumImpact=40.0, maximumImpact=50.0]IceStorm [name=Spell:IceStorm, manaCost=20.0, minimumImpact=50.0, maximumImpact=60.0]Minor Healing [name=Spell:Minor Healing, manaCost=10.0, minimumImpact=40.0, maximumImpact=40.0]], mana=15.0, getName()=Macros the Black Ver(4), getHp()=52.0, getMaxHp()=120.0]]] **************************************************** Mage :3 Warrior :2 Killed Each Other :0 Debug Structure Code Below X Deal Damage [Warrior Action: Attacks ->with Weapon:Sword for 32.0 hp of damage:][Sound::Wosh] X Receive Damage Mym uses armor to reduce damage from 999 to 989. Remaining hp is 10 W Receive Damage Jon-Tom uses armor to reduce damage from 999 to 999. Remaining hp is 0Magician Action: Mage has died and chooses to skip turn