Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CombatObject
- {
- private int HP;
- private Weapon main;
- private Weapon secondary;
- private int ad;
- private int spe;
- private int cHP;//current hp
- private char ch1r;
- public CombatObject(MC player)
- {
- HP = player.getHP();
- main = player.getWeapon();
- secondary = player.getSecondary();
- ad = main.getAtk();
- ch1r = '@';
- }
- public CombatObject(int hp, int sp, int a, char e)
- {
- HP = hp;
- spe = sp;
- ad = a;
- ch1r = e;
- }
- //accessor methods
- public int getHP()
- {
- return HP;
- }
- public Weapon getMain()
- {
- return main;
- }
- public Weapon getSecondary()
- {
- return secondary;
- }
- public int getAd()
- {
- return ad;
- }
- public int getSpe()
- {
- return spe;
- }
- public int getCurHP()
- {
- return cHP;
- }
- public char getChar()
- {
- return ch1r;
- }
- //editor methods
- public void setHP(int a)
- {
- HP = a;
- }
- public void setMain(Weapon a)
- {
- main = a;
- }
- public void setSecondary(Weapon a)
- {
- secondary = a;
- }
- public void setAd(int a)
- {
- ad = a;
- }
- public void setSpe(int a)
- {
- spe = a;
- }
- public void setCurHP(int a)
- {
- cHP = a;
- }
- public void setChar(char e)
- {
- ch1r = e;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement