-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mirror tower stages; fix tower time challenge and star scoring (#…
- Loading branch information
Showing
13 changed files
with
264 additions
and
53 deletions.
There are no files selected for viewing
69 changes: 59 additions & 10 deletions
69
src/main/java/emu/grasscutter/data/excels/tower/TowerLevelData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,82 @@ | ||
package emu.grasscutter.data.excels.tower; | ||
|
||
import emu.grasscutter.data.*; | ||
import java.util.List; | ||
import lombok.*; | ||
|
||
@ResourceType(name = "TowerLevelExcelConfigData.json") | ||
@Getter | ||
public class TowerLevelData extends GameResource { | ||
|
||
private int levelId; | ||
private int levelIndex; | ||
private int levelGroupId; | ||
private int dungeonId; | ||
private List<TowerLevelCond> conds; | ||
|
||
public static class TowerLevelCond { | ||
private TowerCondType towerCondType; | ||
private List<Integer> argumentList; | ||
} | ||
|
||
public enum TowerCondType { | ||
TOWER_COND_NONE, | ||
TOWER_COND_CHALLENGE_LEFT_TIME_MORE_THAN, | ||
TOWER_COND_LEFT_HP_GREATER_THAN | ||
} | ||
|
||
// Not actual data in TowerLevelExcelConfigData. | ||
// Just packaging condition parameters for convenience. | ||
@Getter | ||
public class TowerCondTimeParams { | ||
private int param1; | ||
private int minimumTimeInSeconds; | ||
|
||
public TowerCondTimeParams(int param1, int minimumTimeInSeconds) { | ||
this.param1 = param1; | ||
this.minimumTimeInSeconds = minimumTimeInSeconds; | ||
} | ||
} | ||
|
||
@Getter | ||
public class TowerCondHpParams { | ||
private int sceneId; | ||
private int configId; | ||
private int minimumHpPercentage; | ||
|
||
public TowerCondHpParams(int sceneId, int configId, int minimumHpPercentage) { | ||
this.sceneId = sceneId; | ||
this.configId = configId; | ||
this.minimumHpPercentage = minimumHpPercentage; | ||
} | ||
} | ||
|
||
@Override | ||
public int getId() { | ||
return this.getLevelId(); | ||
} | ||
|
||
public int getLevelId() { | ||
return levelId; | ||
} | ||
|
||
public int getLevelGroupId() { | ||
return levelGroupId; | ||
public TowerCondType getCondType(int star) { | ||
if (star < 0 || conds == null || star >= conds.size()) { | ||
return TowerCondType.TOWER_COND_NONE; | ||
} | ||
var condType = conds.get(star).towerCondType; | ||
return condType == null ? TowerCondType.TOWER_COND_NONE : condType; | ||
} | ||
|
||
public int getLevelIndex() { | ||
return levelIndex; | ||
public TowerCondTimeParams getTimeCond(int star) { | ||
if (star < 0 || conds == null || star >= conds.size()) { | ||
return null; | ||
} | ||
var params = conds.get(star).argumentList; | ||
return new TowerCondTimeParams(params.get(0), params.get(1)); | ||
} | ||
|
||
public int getDungeonId() { | ||
return dungeonId; | ||
public TowerCondHpParams getHpCond(int star) { | ||
if (star < 0 || conds == null || star >= conds.size()) { | ||
return null; | ||
} | ||
var params = conds.get(star).argumentList; | ||
return new TowerCondHpParams(params.get(0), params.get(1), params.get(2)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/main/java/emu/grasscutter/game/dungeons/challenge/trigger/InTimeTrigger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.