Skip to content

Commit

Permalink
fix operations for XII
Browse files Browse the repository at this point in the history
  • Loading branch information
5pilow committed Oct 1, 2023
1 parent c8eff18 commit cf6dea8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/leekwars/generator/fight/Fight.java
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ public void startTurn() throws Exception {

state.statistics.addTimes(current, endTime - startTime, ai.operations());
executionTime += endTime - startTime;
current.addOperations(ai.operations());
} else {
// Add 'crash' action if AI is invalid
if (getTurn() == 1) {
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/leekwars/generator/state/Entity.java
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,6 @@ public void endTurn() {
saysTurn = 0;
showsTurn = 0;

if (ai != null) {
// totalOperations += ai.operations();
}

// Propagation des effets
for (Effect effect : effects) {
if (effect.propagate > 0) {
Expand Down Expand Up @@ -1104,4 +1100,8 @@ public void setBirthTurn(int birthTurn) {
public int getBirthTurn() {
return mBirthTurn;
}

public void addOperations(long operations) {
this.totalOperations += operations;
}
}

0 comments on commit cf6dea8

Please sign in to comment.