Skip to content
Snippets Groups Projects
Commit 3193d3b2 authored by Susan Yuen's avatar Susan Yuen :rabbit2:
Browse files

Revert "Working on making functional weapons."

This reverts commit 8ca3376d
parent 8ca3376d
No related branches found
No related tags found
1 merge request!5Revert "Working on making functional weapons."

using System;
namespace Model
{
class BronzeSword : Weapon
{
private int minRange;
private int maxRange;
private int modStr;
private int modSkill;
private int modIntelligence;
private int[] range;
private bool equipped;
public int[] getRange()
{
minRange = 1;
maxRange = 1;
range = new int[2];
range[0] = minRange;
range[1] = maxRange;
return range;
}
public void statModifiers(Unit unit)
{
modStr = 5;
modIntelligence = 5;
modSkill = 10;
unit.setStrength(modStr); // Strength = Strength + 5
unit.setSkill(modSkill); // skill = skill + 10
unit.setIntelligence(modIntelligence); // int = int + 0
}
}
}
...@@ -32,14 +32,10 @@ namespace Model ...@@ -32,14 +32,10 @@ namespace Model
Texture2D getCharInfo(); // returns the char info screen texture Texture2D getCharInfo(); // returns the char info screen texture
Tuple<int, int> getPosition(); // returns the current position (by node) of the unit Tuple<int, int> getPosition(); // returns the current position (by node) of the unit
Vector2 getPixelCoordinates(); // returns the pixel coordinates of the sprite Vector2 getPixelCoordinates(); // returns the pixel coordinates of the sprite
void setStrength(int mod);
void setIntelligence(int mod);
void setSkill(int mod);
void setPixelCoordinates(Vector2 p); // sets the pixel coordinates of the sprite void setPixelCoordinates(Vector2 p); // sets the pixel coordinates of the sprite
void setPosition(int x, int y); // sets the current position (by node) of the unit void setPosition(int x, int y); // sets the current position (by node) of the unit
void setEquippedWeapon(Weapon w); // sets the unit's currently equipped weapon void setEquippedWeapon(Weapon w); // sets the unit's currently equipped weapon
void setMoved(bool a); // on start of players turn, set all units to unmoved (F) void setMoved(bool a); // on start of players turn, set all units to unmoved (F)
void setEquipableWeapons(Weapon add); // need to update the weapon array, put new weapon into it
MenuButton[] getMenuButtons(); // returns the dropdown menu buttons of the unit MenuButton[] getMenuButtons(); // returns the dropdown menu buttons of the unit
} }
......
...@@ -49,7 +49,6 @@ namespace Model ...@@ -49,7 +49,6 @@ namespace Model
position = new Tuple<int, int>(positionX, positionY); position = new Tuple<int, int>(positionX, positionY);
setMenuButtonCoordinates(pixelCoordinates); setMenuButtonCoordinates(pixelCoordinates);
equipableWeapons = new Weapon[3];
} }
public bool isAlive() public bool isAlive()
...@@ -229,22 +228,5 @@ namespace Model ...@@ -229,22 +228,5 @@ namespace Model
{ {
} }
// if the weaqpon slot is empty, add the weapon
public void setEquipableWeapons(Weapon add)
{
for (int i =0; i < this.equipableWeapons.GetLength(1); i++)
{
Weapon current = equipableWeapons.ElementAt(i);
if (current != null)
{
current = add;
break;
}
}
}
} }
} }
...@@ -7,14 +7,11 @@ namespace Model ...@@ -7,14 +7,11 @@ namespace Model
{ {
interface Weapon interface Weapon
{ {
//int getPhysicalDamage(); int getPhysicalDamage();
// int getMagicDamage(); int getMagicDamage();
int getCritRate();
int[] getRange(); // get the range of the weapon, i believe that using Unit.equippedWeapon int getHitRate();
int getRange(); // get the range of the weapon, i believe that using Unit.equippedWeapon
// or weapon with largest range in inventory to determine attackable squares, as opposed to the unit itself. // or weapon with largest range in inventory to determine attackable squares, as opposed to the unit itself.
bool isEquipped(Unit unit);
void statModifiers(Unit unit);
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment