all repos — RPG @ e4654d09764a984539ba6cb6880cea7492aff7b6

Fully functional 3D turn based role playing game coded in C# and base Unity.

added fireball logic; removed dbName from ability
Marco Andronaco andronacomarco@gmail.com
Fri, 17 Apr 2020 13:00:52 +0200
commit

e4654d09764a984539ba6cb6880cea7492aff7b6

parent

5ec8a78dde387284a445b93ea73f4a6a14b5e1e6

M Assets/Scripts/Battle/Abilities/Attack.csAssets/Scripts/Battle/Abilities/Attack.cs

@@ -7,7 +7,6 @@ {

//constructor public Attack() { - dbName = "Attack"; guiName = "Attack"; hasTarget = true; ow_usable = false;
M Assets/Scripts/Battle/Abilities/Defend.csAssets/Scripts/Battle/Abilities/Defend.cs

@@ -9,7 +9,6 @@

//constructor public Defend() { - dbName = "Defend"; guiName = "Defend"; hasTarget = false; ow_usable = false;
M Assets/Scripts/Battle/Abilities/FireBall.csAssets/Scripts/Battle/Abilities/FireBall.cs

@@ -6,7 +6,6 @@ public class FireBall : Ability

{ public FireBall() { - dbName = "FireBall"; guiName = "Fireball"; hasTarget = true; ow_usable = false;

@@ -22,8 +21,7 @@ }

string str = source + " throws a fireball at " + target + "!"; double damage = 0; - //TODO: number logic - damage = 300; + damage = source.stats.MaxMP * 2 / 3; damage += (damage * UnityEngine.Random.Range(-5, 5) / 100); target.stats.HP -= damage;
M Assets/Scripts/Battle/Abilities/Heal.csAssets/Scripts/Battle/Abilities/Heal.cs

@@ -9,7 +9,6 @@ protected double heal_amount;

public Heal() { - dbName = "Heal"; guiName = "Heal"; hasTarget = true; ow_usable = true;
M Assets/Scripts/Battle/Abilities/HealBig.csAssets/Scripts/Battle/Abilities/HealBig.cs

@@ -7,7 +7,6 @@ public class HealBig : Heal

{ public HealBig() { - dbName = "HealBig"; guiName = "Mega Heal"; hasTarget = true; ow_usable = true;
M Assets/Scripts/Battle/Abilities/HealGreat.csAssets/Scripts/Battle/Abilities/HealGreat.cs

@@ -7,7 +7,6 @@ public class HealGreat : Heal

{ public HealGreat() { - dbName = "HealGreat"; guiName = "Giga Heal"; hasTarget = true; ow_usable = true;
M Assets/Scripts/Battle/Abilities/ReviveFull.csAssets/Scripts/Battle/Abilities/ReviveFull.cs

@@ -7,7 +7,6 @@ public class ReviveFull : Ability

{ public ReviveFull() { - dbName = "ReviveFull"; guiName = "Miracle"; hasTarget = true; ow_usable = true;
M Assets/Scripts/Battle/Abilities/ReviveHalf.csAssets/Scripts/Battle/Abilities/ReviveHalf.cs

@@ -7,7 +7,6 @@ public class ReviveHalf : Ability

{ public ReviveHalf() { - dbName = "ReviveHalf"; guiName = "Blessing"; hasTarget = true; ow_usable = true;
M Assets/Scripts/Battle/Ability.csAssets/Scripts/Battle/Ability.cs

@@ -5,7 +5,6 @@

[System.Serializable] public abstract class Ability : Action { - public string dbName; public string guiName; public bool hasTarget; public double MP_cost;
M Assets/Scripts/Utility/Stats.csAssets/Scripts/Utility/Stats.cs

@@ -100,7 +100,7 @@ abilities.Add(new Defend());

break; case "Mage": hp = maxHP = 375; - mp = maxMP = 600; + mp = maxMP = 450; atk = maxATK = 30; def = maxDEF = 50; agl = maxAGL = 32;

@@ -127,7 +127,7 @@ lck = maxLCK = 20;

break; case "Brady": hp = maxHP = 1000; - mp = maxMP = 500; + mp = maxMP = 600; atk = maxATK = 50; def = maxDEF = 60; agl = maxAGL = 30;

@@ -136,8 +136,8 @@ abilities.Add(new FireBall());

abilities.Add(new HealBig()); break; case "Ganfaul": - hp = maxHP = 2000; - mp = maxMP = 700; + hp = maxHP = 2500; + mp = maxMP = 660; atk = maxATK = 55; def = maxDEF = 60; agl = maxAGL = 32;