Exemple #1
0
    public override BattleData use(Nalp user)
    {
        int d = damage + user.Strength;

        curUse--;
        return(new BattleData(Hit(), Crit(), d, type, name));
    }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     itemDatas    = new List <ItemData>(Resources.LoadAll <ItemData>("Items"));
     abilityDatas = new List <AbilityData>(Resources.LoadAll <AbilityData>("Abilities"));
     player       = new Player();
     enemy        = new Nalp();
 }
Exemple #3
0
    void setAbilityText(Nalp n)
    {
        box0.text = "";
        box1.text = "";
        box2.text = "";
        box3.text = "";
        for (int i = 0; i < n.MoveList.Count; i++)
        {
            switch (i)
            {
            case 0:
                box0.text = n.MoveList[0].Name;
                break;

            case 1:
                box1.text = n.MoveList[1].Name;
                break;

            case 2:
                box2.text = n.MoveList[2].Name;
                break;

            case 3:
                box3.text = n.MoveList[3].Name;
                break;

            default:
                break;
            }
        }
    }
Exemple #4
0
 public void update(Player player, Nalp n)
 {
     hpCur.Clear();
     hpTot.Clear();
     names.Clear();
     hpCur.Add(player.Hp);
     hpCur.Add(n.Hp);
     hpTot.Add(player.MaxHp);
     hpTot.Add(n.MaxHp);
     names.Add(player.Name);
     names.Add(n.Name);
 }
Exemple #5
0
 public BattleInfo(Player player, Nalp n)
 {
     hpCur = new List <int>();
     hpTot = new List <int>();
     names = new List <string>();
     hpCur.Add(player.Hp);
     hpCur.Add(n.Hp);
     hpTot.Add(player.MaxHp);
     hpTot.Add(n.MaxHp);
     names.Add(player.Name);
     names.Add(n.Name);
 }
Exemple #6
0
    // Start is called before the first frame update
    void Start()
    {
        //find the player object by reference
        player = GameObject.FindGameObjectsWithTag("PlayerData")[0].GetComponent <PlayerScript>().player;
        enemy  = new Nalp();

        //Manually set enemies
        player.Enemy = enemy;
        enemy.Enemy  = player;

        //Create info for UI
        battleInfo  = new BattleInfo(player, enemy);
        abilityInfo = new AbilityInfo(player);
    }
Exemple #7
0
 //Return the BattleData to be read by the enemy
 //Input: Nalp to modify the move if the user's stats influence its power
 public virtual BattleData use(Nalp user)
 {
     curUse--;
     return(new BattleData(Hit(), Crit(), damage, type, name));
 }