Added more content, tweaked AI resources and buffs

- Added invasion-specific buffs
- Added factional handling
- Added AI switches
- Added construction/repairing
- Fixed enemy TANO color when changing status
- Fixed notification baselines to consider GCW-specific circumstances
- Optimized AI algorithmic complexity by eliminating expensive
arithmetic operations
- Fixed reposition state to avoid locations in water
- Considered tower defense buff for NPCs in combat service
- Compacted 3 AI threads into one
- Dynamic allocation of AI resources depending on patrol point index and
same faction AI density
- Added Withdrawal state for more realistic post-battle behaviour
- Positioned all pylons, camps, officers, terminals, barricades,
turrets, towers, cloners in the appropriate coordinates
This commit is contained in:
CharonInferar
2014-08-02 00:06:22 +02:00
parent b1f05c6802
commit 5981efda9f
56 changed files with 5074 additions and 1232 deletions
+18 -1
View File
@@ -46,6 +46,7 @@ import resources.objects.creature.CreatureObject;
import resources.objects.group.GroupObject;
import resources.objects.player.PlayerObject;
import resources.objects.weapon.WeaponObject;
import resources.skills.SkillMod;
import services.ai.AIActor;
import services.ai.states.FollowState;
import services.command.CombatCommand;
@@ -130,6 +131,10 @@ public class BuffService implements INetworkDispatch {
} else {
if (! hasBuff(target,buffName)) // QA, prevent infinite "refreshing" of buff by repeated use
doAddBuff(target, buffName, buffer);
else {
if (buff.getMaxStacks()>1)
doAddBuff(target, buffName, buffer);
}
return true;
}
}
@@ -191,6 +196,12 @@ public class BuffService implements INetworkDispatch {
if(buff.getEffect3Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect3Name(), (int) buff.getEffect3Value());
if(buff.getEffect4Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect4Name(), (int) buff.getEffect4Value());
if(buff.getEffect5Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect5Name(), (int) buff.getEffect5Value());
if (buffName.equals("gcw_fatigue")){
if (FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) {
core.scriptService.callScript("scripts/buffs/", buffName, "add", core, buffer, buff);
}
}
// }
target.addBuff(buff);
@@ -266,7 +277,13 @@ public class BuffService implements INetworkDispatch {
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect3Name(), (int) buff.getEffect3Value());
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect4Name(), (int) buff.getEffect4Value());
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect5Name(), (int) buff.getEffect5Value());
// }
if (buff.getBuffName().equals("gcw_fatigue")){
if (FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) {
core.scriptService.callScript("scripts/buffs/", buff.getBuffName(), "remove", core, creature, buff);
}
}
// }
if (!buff.getCallback().equals("none") && !buff.getCallback().equals("")) {
if (FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) {