mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 13:29:43 +00:00
Combat Policy: Tactical Completed
- Added Normal / Reverse Button Tactical targets the strongest threat, while Reverse targets the weakest ones
This commit is contained in:
1 parent
d8f320f79c
commit
b17d95edde
4 files changed
+19
-3
No files matched your search
@@ -80,6 +80,10 @@ public class GuiNpcAI extends GuiNPCInterface2 implements ITextfieldListener, IG
|
||||
getTextField(4).integersOnly = true;
|
||||
getTextField(4).setMinMaxDefault(1, 100, 5);
|
||||
}
|
||||
else if (ai.combatPolicy == EnumCombatPolicy.Tactical)
|
||||
{
|
||||
addButton(new GuiNpcButton(40, guiLeft + 295, guiTop + 160, 60, 20, new String[]{"stats.normal","stats.reverse"}, npc.ai.tacticalChance > 50 ? 1:0));
|
||||
}
|
||||
|
||||
getButton(17).setEnabled(this.ai.onAttack == 0);
|
||||
getButton(15).setEnabled(this.ai.onAttack == 0);
|
||||
@@ -156,6 +160,15 @@ public class GuiNpcAI extends GuiNPCInterface2 implements ITextfieldListener, IG
|
||||
ai.combatPolicy = EnumCombatPolicy.values()[button.getValue()];
|
||||
initGui();
|
||||
}
|
||||
else if (button.id == 40) {
|
||||
int val = button.getValue();
|
||||
if(val == 0){
|
||||
ai.tacticalChance = 0;
|
||||
} else {
|
||||
ai.tacticalChance = 100;
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user