From 52981692b0a31d0b8d35c44fc5ae7bcd53d942de Mon Sep 17 00:00:00 2001 From: Thorin Schmidt Date: Fri, 13 Oct 2017 14:32:11 -0500 Subject: [PATCH] INTERNAL ONLY - added size category to weapons "Normal, Barbarian, Large, Enormous" --- .../cis/mazeminotaurs/EquipmentDB.java | 32 ++++++++--------- .../com/example/cis/mazeminotaurs/Weapon.java | 36 +++++++++++++++---- .../src/main/res/values/game_references.xml | 6 ++++ MazesAndMinotaurs/instapk.log | 2 +- 4 files changed, 53 insertions(+), 23 deletions(-) diff --git a/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/EquipmentDB.java b/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/EquipmentDB.java index 94f28e3..301604d 100644 --- a/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/EquipmentDB.java +++ b/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/EquipmentDB.java @@ -42,22 +42,22 @@ private EquipmentDB() { equipment.add(new Equipment(R.string.rations, 0, 1, 2, "One Day's Worth Of Food")); equipment.add(new Equipment(R.string.waterskin, 1, 1, 2, "A Skin Full of Water")); - //(resID, encumbrance, qty, costInSilver, longDescription, dmgDie, numDice, dmgBonus, type) - weapons.add(new Weapon(R.string.barb_axe, 2, 1, 30, "Large, Ugly Axe!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.barb_club, 2, 1, 0, "Large, Heavy Club!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.barb_sword, 2, 1, 60, "Large, Ugly, Heavy Sword!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.barb_mace, 2, 1, 30, "Large, Ugly Mace!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.dagger, 0, 1, 15, "Small Sinister dagger!", 3, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.throw_knife, 0, 1, 15, "A knife made for throwing!", 3, 1, 0, R.string.missile)); - weapons.add(new Weapon(R.string.axe, 1, 1, 30, "A Nasty, Wicked Axe!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.club, 1, 1, 0, "A not-so-heavy Club!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.sword, 1, 1, 60, "A Dangerous, Deadly Blade!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.spear, 2, 1, 30, "Wicked, Deadly Spear!", 6, 1, 0, R.string.melee)); - weapons.add(new Weapon(R.string.bow, 1, 1, 40, "Standard Bow", 6, 1, 0, R.string.missile, 300)); - weapons.add(new Weapon(R.string.sling, 0, 1, 5, "Standard Sling", 6, 1, 0, R.string.missile, 150)); - weapons.add(new Weapon(R.string.javelin, 2, 1, 30, "A Deadly Javelin", 6, 1, 0, R.string.missile)); - weapons.add(new Weapon(R.string.arrows, 1, 12, 12, "A quiver of Arrows", 0, 0, 0, R.string.missile)); - weapons.add(new Weapon(R.string.slingshot, 1, 10, 2, "A Small Sack of Sling Stones", 0, 0, 0, R.string.missile)); + //(resID, encumbrance, qty, costInSilver, longDescription, dmgDie, numDice, dmgBonus, type, size, range) + weapons.add(new Weapon(R.string.barb_axe, 2, 1, 30, "Large, Ugly Axe!", 6, 1, 0, R.string.melee, R.string.size_barbarian, 0)); + weapons.add(new Weapon(R.string.barb_club, 2, 1, 0, "Large, Heavy Club!", 6, 1, 0, R.string.melee, R.string.size_barbarian, 0)); + weapons.add(new Weapon(R.string.barb_sword, 2, 1, 60, "Large, Ugly, Heavy Sword!", 6, 1, 0, R.string.melee, R.string.size_barbarian, 0)); + weapons.add(new Weapon(R.string.barb_mace, 2, 1, 30, "Large, Ugly Mace!", 6, 1, 0, R.string.melee, R.string.size_barbarian, 0)); + weapons.add(new Weapon(R.string.dagger, 0, 1, 15, "Small Sinister dagger!", 3, 1, 0, R.string.melee, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.throw_knife, 0, 1, 15, "A knife made for throwing!", 3, 1, 0, R.string.missile, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.axe, 1, 1, 30, "A Nasty, Wicked Axe!", 6, 1, 0, R.string.melee, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.club, 1, 1, 0, "A not-so-heavy Club!", 6, 1, 0, R.string.melee, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.sword, 1, 1, 60, "A Dangerous, Deadly Blade!", 6, 1, 0, R.string.melee, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.spear, 2, 1, 30, "Wicked, Deadly Spear!", 6, 1, 0, R.string.melee, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.bow, 1, 1, 40, "Standard Bow", 6, 1, 0, R.string.missile, R.string.size_normal, 300)); + weapons.add(new Weapon(R.string.sling, 0, 1, 5, "Standard Sling", 6, 1, 0, R.string.missile, R.string.size_normal, 150)); + weapons.add(new Weapon(R.string.javelin, 2, 1, 30, "A Deadly Javelin", 6, 1, 0, R.string.missile, R.string.size_normal, 150)); + weapons.add(new Weapon(R.string.arrows, 1, 12, 12, "A quiver of Arrows", 0, 0, 0, R.string.missile, R.string.size_normal, 0)); + weapons.add(new Weapon(R.string.slingshot, 1, 10, 2, "A Small Sack of Sling Stones", 0, 0, 0, R.string.missile, R.string.size_normal, 0)); //(resID, encumbrance, qty, costInSilver, longDescription, defenseBonus) armor.add(new Armor(R.string.breastplate, 3, 1, 150, "A Sturdy, Functional Breastplate", 2)); diff --git a/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/Weapon.java b/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/Weapon.java index 8eecb44..5d37b39 100644 --- a/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/Weapon.java +++ b/MazesAndMinotaurs/app/src/main/java/com/example/cis/mazeminotaurs/Weapon.java @@ -11,21 +11,37 @@ public class Weapon extends Equipment { private int mNumberOfDice; private int mDamageBonus; private int mWeaponType; //uses string values melee and missile - private int mRange = 0; + private int mWeaponSize; //uses string values from game_references.xml + private int mRange; - public Weapon(int resId, int encumberance, int quantity, double costInSp, + /**public Weapon(int resId, int encumberance, int quantity, double costInSp, String longDescription, int damageDie, int numberOfDice, int damageBonus, - int weaponType) { + int weaponType, int weaponSize) { super(resId, encumberance, quantity, costInSp, longDescription); mDamageDie = damageDie; mNumberOfDice = numberOfDice; mDamageBonus = damageBonus; mWeaponType = weaponType; - } - + mWeaponSize = weaponSize; + }*/ + + /** + * weapon constructor + * @param resId + * @param encumberance + * @param quantity + * @param costInSp + * @param longDescription + * @param damageDie + * @param numberOfDice + * @param damageBonus + * @param weaponType + * @param weaponSize + * @param range + */ public Weapon(int resId, int encumberance, int quantity, double costInSp, String longDescription, int damageDie, int numberOfDice, int damageBonus, - int weaponType, int range) { + int weaponType, int weaponSize, int range) { super(resId, encumberance, quantity, costInSp, longDescription); mDamageDie = damageDie; mNumberOfDice = numberOfDice; @@ -74,6 +90,14 @@ public void setRange(int range) { mRange = range; } + public int getWeaponSize() { + return mWeaponSize; + } + + public void setWeaponSize(int weaponSize) { + mWeaponSize = weaponSize; + } + @Override public String toString() { return super.toString() +"\n" + diff --git a/MazesAndMinotaurs/app/src/main/res/values/game_references.xml b/MazesAndMinotaurs/app/src/main/res/values/game_references.xml index 07c1ab5..99e4ded 100644 --- a/MazesAndMinotaurs/app/src/main/res/values/game_references.xml +++ b/MazesAndMinotaurs/app/src/main/res/values/game_references.xml @@ -34,6 +34,12 @@ Hunting Thievery + + Normal + Barbarian + Large + Enormous + Aphrodite Apollo diff --git a/MazesAndMinotaurs/instapk.log b/MazesAndMinotaurs/instapk.log index 6b941f2..cfc9825 100644 --- a/MazesAndMinotaurs/instapk.log +++ b/MazesAndMinotaurs/instapk.log @@ -1,2 +1,2 @@ -Oct 12, 2017 12:14:59 PM com.pytenlabs.instapk.helpers.LogHelper init +Oct 13, 2017 1:32:17 PM com.pytenlabs.instapk.helpers.LogHelper init INFO: Windows 7, 6.1, amd64, Android Studio AI-162.2228.14