]> git.localhorst.tv Git - l2e.git/commitdiff
added Maxim's IP attacks
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 10 Aug 2012 14:26:55 +0000 (16:26 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Fri, 10 Aug 2012 14:26:55 +0000 (16:26 +0200)
src/battle/Hero.h
src/main.cpp

index 499239d961beefa21410a3464d4e147eb2c86565..60bca6dd544d009462d492ed7f0da9caf53a8327 100644 (file)
@@ -41,7 +41,7 @@ public:
        int RelativeMana(int max) const { return MaxMana() == 0 ? 0 : Mana() * max / MaxMana(); }
        bool CanUseMagic() const { return MaxMana() > 0; }
 
-       Uint8 MaxIP() const { return 255; }
+       Uint8 MaxIP() const { return 100; }
        Uint8 IP() const { return ip; }
        int RelativeIP(int max) const { return IP() * max / MaxIP(); }
 
index 718aabe08498daa1caafb77773d42ac878ac1053..4f50463ba258fa6102f0ab6958e011812fddb3ca 100644 (file)
@@ -12,6 +12,7 @@
 #include "battle/Monster.h"
 #include "battle/PartyLayout.h"
 #include "battle/Resources.h"
+#include "common/Ikari.h"
 #include "common/Inventory.h"
 #include "common/Item.h"
 #include "common/Spell.h"
@@ -36,6 +37,7 @@ using battle::BattleState;
 using battle::Hero;
 using battle::Monster;
 using battle::PartyLayout;
+using common::Ikari;
 using common::Inventory;
 using common::Item;
 using common::Spell;
@@ -93,7 +95,7 @@ int main(int argc, char **argv) {
                maxim.SetHealth(33);
                maxim.SetMaxMana(20);
                maxim.SetMana(20);
-               maxim.SetIP(0);
+               maxim.SetIP(100);
 
                SDL_Surface *selanImg(IMG_Load("test-data/selan.png"));
                Sprite selanSprite(selanImg, 64, 64);
@@ -105,7 +107,7 @@ int main(int argc, char **argv) {
                selan.SetHealth(28);
                selan.SetMaxMana(23);
                selan.SetMana(23);
-               selan.SetIP(0);
+               selan.SetIP(80);
 
                SDL_Surface *guyImg(IMG_Load("test-data/guy.png"));
                Sprite guySprite(guyImg, 64, 64);
@@ -117,7 +119,7 @@ int main(int argc, char **argv) {
                guy.SetHealth(38);
                guy.SetMaxMana(0);
                guy.SetMana(0);
-               guy.SetIP(0);
+               guy.SetIP(85);
 
                SDL_Surface *dekarImg(IMG_Load("test-data/dekar.png"));
                Sprite dekarSprite(dekarImg, 64, 64);
@@ -129,7 +131,7 @@ int main(int argc, char **argv) {
                dekar.SetHealth(38);
                dekar.SetMaxMana(0);
                dekar.SetMana(0);
-               dekar.SetIP(0);
+               dekar.SetIP(50);
 
                battle::Resources battleRes;
 
@@ -318,26 +320,56 @@ int main(int argc, char **argv) {
                Item zircoSword;
                zircoSword.SetName("Zirco sword");
                zircoSword.SetMenuIcon(&swordIcon);
+               Ikari firestorm;
+               firestorm.SetName("Firestorm");
+               firestorm.SetCost(88);
+               firestorm.GetTargetingMode().TargetAllEnemies();
+               zircoSword.SetIkari(&firestorm);
                maxim.SetWeapon(&zircoSword);
                Item zirconArmor;
                zirconArmor.SetName("Zircon armor");
                zirconArmor.SetMenuIcon(&armorIcon);
+               Ikari magicCure;
+               magicCure.SetName("Magic cure");
+               magicCure.SetCost(51);
+               magicCure.GetTargetingMode().TargetSingleAlly();
+               zirconArmor.SetIkari(&magicCure);
                maxim.SetArmor(&zirconArmor);
                Item holyShield;
                holyShield.SetName("Holy shield");
                holyShield.SetMenuIcon(&shieldIcon);
+               Ikari lightGuard;
+               lightGuard.SetName("Light guard");
+               lightGuard.SetCost(51);
+               lightGuard.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self
+               holyShield.SetIkari(&lightGuard);
                maxim.SetShield(&holyShield);
                Item legendHelm;
                legendHelm.SetName("Legend helm");
                legendHelm.SetMenuIcon(&helmetIcon);
+               Ikari boomerang;
+               boomerang.SetName("Boomerang");
+               boomerang.SetCost(65);
+               boomerang.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self
+               legendHelm.SetIkari(&boomerang);
                maxim.SetHelmet(&legendHelm);
                Item sProRing;
                sProRing.SetName("S-pro ring");
                sProRing.SetMenuIcon(&ringIcon);
+               Ikari courage;
+               courage.SetName("Courage");
+               courage.SetCost(26);
+               courage.GetTargetingMode().TargetMultipleAllies();
+               sProRing.SetIkari(&courage);
                maxim.SetRing(&sProRing);
                Item evilJewel;
                evilJewel.SetName("Evil jewel");
                evilJewel.SetMenuIcon(&jewelIcon);
+               Ikari gloomy;
+               gloomy.SetName("Gloomy");
+               gloomy.SetCost(65);
+               gloomy.GetTargetingMode().TargetAllEnemies();
+               evilJewel.SetIkari(&gloomy);
                maxim.SetJewel(&evilJewel);
 
                Item zircoWhip;