diff --git a/src/main/java/emu/grasscutter/data/excels/DungeonChallengeConfigData.java b/src/main/java/emu/grasscutter/data/excels/DungeonChallengeConfigData.java index 5f5ed432..f139e782 100644 --- a/src/main/java/emu/grasscutter/data/excels/DungeonChallengeConfigData.java +++ b/src/main/java/emu/grasscutter/data/excels/DungeonChallengeConfigData.java @@ -3,13 +3,9 @@ package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; -import emu.grasscutter.game.dungeons.challenge.ChallengeType; -import emu.grasscutter.game.quest.enums.LogicType; +import emu.grasscutter.game.dungeons.challenge.enums.ChallengeType; import lombok.Getter; -import java.util.List; - @Getter @ResourceType(name = "DungeonChallengeConfigData.json") public class DungeonChallengeConfigData extends GameResource { diff --git a/src/main/java/emu/grasscutter/data/excels/DungeonData.java b/src/main/java/emu/grasscutter/data/excels/DungeonData.java index 7325f1be..7420b265 100644 --- a/src/main/java/emu/grasscutter/data/excels/DungeonData.java +++ b/src/main/java/emu/grasscutter/data/excels/DungeonData.java @@ -3,8 +3,7 @@ package emu.grasscutter.data.excels; import emu.grasscutter.data.GameData; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; -import emu.grasscutter.game.dungeons.*; -import it.unimi.dsi.fastutil.ints.Int2ObjectMap; +import emu.grasscutter.game.dungeons.enums.*; import lombok.Getter; import java.util.List; diff --git a/src/main/java/emu/grasscutter/data/excels/DungeonPassConfigData.java b/src/main/java/emu/grasscutter/data/excels/DungeonPassConfigData.java index 1e4deb90..9977ae9d 100644 --- a/src/main/java/emu/grasscutter/data/excels/DungeonPassConfigData.java +++ b/src/main/java/emu/grasscutter/data/excels/DungeonPassConfigData.java @@ -3,7 +3,7 @@ package emu.grasscutter.data.excels; import emu.grasscutter.data.GameResource; import emu.grasscutter.data.ResourceType; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.quest.enums.LogicType; import lombok.Getter; diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java index a1058ebb..4fd23426 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonManager.java @@ -6,6 +6,7 @@ import emu.grasscutter.data.common.ItemParamData; import emu.grasscutter.data.excels.DungeonData; import emu.grasscutter.data.excels.DungeonPassConfigData; import emu.grasscutter.game.dungeons.dungeon_results.BaseDungeonResult; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.inventory.GameItem; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.ActionReason; diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonValue.java b/src/main/java/emu/grasscutter/game/dungeons/DungeonValue.java index 86809613..d9788cc4 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonValue.java +++ b/src/main/java/emu/grasscutter/game/dungeons/DungeonValue.java @@ -1,5 +1,7 @@ package emu.grasscutter.game.dungeons; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; + import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/DungeonChallenge.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/DungeonChallenge.java index 64fbcce3..0b790755 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/challenge/DungeonChallenge.java +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/DungeonChallenge.java @@ -1,12 +1,10 @@ package emu.grasscutter.game.dungeons.challenge; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.challenge.trigger.ChallengeTrigger; -import emu.grasscutter.game.props.WatcherTriggerType; import emu.grasscutter.game.world.Scene; -import emu.grasscutter.scripts.constants.EventType; import emu.grasscutter.scripts.data.SceneGroup; -import emu.grasscutter.scripts.data.ScriptArgs; + import java.util.List; public class DungeonChallenge extends WorldChallenge { diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeCondType.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeCondType.java new file mode 100644 index 00000000..fa5c38ad --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeCondType.java @@ -0,0 +1,19 @@ +package emu.grasscutter.game.dungeons.challenge.enums; + +public enum ChallengeCondType { + CHALLENGE_COND_NONE, //00 + CHALLENGE_COND_IN_TIME, //01 + CHALLENGE_COND_ALL_TIME, //02 + CHALLENGE_COND_KILL_COUNT, //03 + CHALLENGE_COND_SURVIVE, //04 + CHALLENGE_COND_TIME_INC, //05 + CHALLENGE_COND_KILL_FAST, //06 + CHALLENGE_COND_DOWN_LESS, //07 + CHALLENGE_COND_BEATEN_LESS , //08 + CHALLENGE_COND_UNNATURAL_COUNT , //09 + CHALLENGE_COND_FROZEN_LESS , //10 + CHALLENGE_COND_KILL_MONSTER , //11 + CHALLENGE_COND_TRIGGER , //12 + CHALLENGE_COND_GUARD_HP , //13 + CHALLENGE_COND_TIME_DEC , //14 +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeEventMarkType.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeEventMarkType.java new file mode 100644 index 00000000..2674df68 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeEventMarkType.java @@ -0,0 +1,9 @@ +package emu.grasscutter.game.dungeons.challenge.enums; + +public enum ChallengeEventMarkType { + CHALLENGE_EVENT_NONE, + FLIGHT_TIME, + FLIGHT_GATHER_POINT, + SUMMER_TIME_SPRINT_BOAT_TIME, + SUMMER_TIME_SPRINT_BOAT_GATHER_POINT, +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeRecordType.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeRecordType.java new file mode 100644 index 00000000..c763903b --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeRecordType.java @@ -0,0 +1,6 @@ +package emu.grasscutter.game.dungeons.challenge.enums; + +public enum ChallengeRecordType { + CHALLENGE_RECORD_TYPE_NONE, + CHALLENGE_RECORD_TYPE_IN_TIME +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/ChallengeType.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeType.java similarity index 90% rename from src/main/java/emu/grasscutter/game/dungeons/challenge/ChallengeType.java rename to src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeType.java index e899f9a1..c59dbd24 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/challenge/ChallengeType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/ChallengeType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons.challenge; +package emu.grasscutter.game.dungeons.challenge.enums; public enum ChallengeType { CHALLENGE_NONE, //00 @@ -16,12 +16,12 @@ public enum ChallengeType { //unknown if position and time match from here on CHALLENGE_TRIGGER2_AVOID_TRIGGER1, CHALLENGE_FATHER_SUCC_IN_TIME, - CHALLENGE_TRIGGER_COUNT, CHALLENGE_MONSTER_DAMAGE_COUNT, CHALLENGE_ELEMENT_REACTION_COUNT, CHALLENGE_FREEZE_ENEMY_IN_TIME, CHALLENGE_CRYSTAL_ELEMENT_REACTION_COUNT, CHALLENGE_SHEILD_ABSORB_DAMAGE_COUNT, CHALLENGE_SWIRL_ELEMENT_REACTION_COUNT, - CHALLENGE_DIE_LESS_IN_TIME + CHALLENGE_DIE_LESS_IN_TIME, + CHALLENGE_TRIGGER_COUNT, } diff --git a/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/FatherChallengeProperty.java b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/FatherChallengeProperty.java new file mode 100644 index 00000000..8a476383 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/challenge/enums/FatherChallengeProperty.java @@ -0,0 +1,9 @@ +package emu.grasscutter.game.dungeons.challenge.enums; + +public enum FatherChallengeProperty { + DURATION, + CUR_SUCC, + CUR_FAIL, + SUM_SUCC, + SUM_FAIL +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonEntrySatisfiedConditionType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonEntrySatisfiedConditionType.java new file mode 100644 index 00000000..fce7da28 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonEntrySatisfiedConditionType.java @@ -0,0 +1,7 @@ +package emu.grasscutter.game.dungeons.enums; + +public enum DungeonEntrySatisfiedConditionType { + DUNGEON_ENTRY_CONDITION_NONE, + DUNGEON_ENTRY_CONDITION_LEVEL, + DUNGEON_ENTRY_CONDITION_QUEST +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonInvolveType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonInvolveType.java similarity index 70% rename from src/main/java/emu/grasscutter/game/dungeons/DungeonInvolveType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/DungeonInvolveType.java index d71da4ee..2e32e349 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonInvolveType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonInvolveType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; public enum DungeonInvolveType { INVOLVE_NONE, diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonPassConditionType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPassConditionType.java similarity index 89% rename from src/main/java/emu/grasscutter/game/dungeons/DungeonPassConditionType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPassConditionType.java index 5717d798..000c7ab4 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonPassConditionType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPassConditionType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; public enum DungeonPassConditionType { DUNGEON_COND_NONE, diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonPlayType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPlayType.java similarity index 62% rename from src/main/java/emu/grasscutter/game/dungeons/DungeonPlayType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPlayType.java index 502964af..e2d28789 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonPlayType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonPlayType.java @@ -1,6 +1,7 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; public enum DungeonPlayType { DUNGEON_PLAY_TYPE_NONE, + DUNGEON_PLAY_TYPE_FOGGY_MAZE, DUNGEON_PLAY_TYPE_MIST_TRIAL, DUNGEON_PLAY_TYPE_TRIAL_AVATAR } diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonSubType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonSubType.java similarity index 76% rename from src/main/java/emu/grasscutter/game/dungeons/DungeonSubType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/DungeonSubType.java index 88c732f8..111b9e2f 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonSubType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonSubType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; public enum DungeonSubType { DUNGEON_SUB_NONE, diff --git a/src/main/java/emu/grasscutter/game/dungeons/DungeonType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonType.java similarity index 95% rename from src/main/java/emu/grasscutter/game/dungeons/DungeonType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/DungeonType.java index 85b58367..4478d3a2 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/DungeonType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungeonType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; import lombok.Getter; diff --git a/src/main/java/emu/grasscutter/game/dungeons/enums/DungunEntryType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/DungunEntryType.java new file mode 100644 index 00000000..709b7f09 --- /dev/null +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/DungunEntryType.java @@ -0,0 +1,12 @@ +package emu.grasscutter.game.dungeons.enums; + +public enum DungunEntryType { + DUNGEN_ENTRY_TYPE_NONE , + DUNGEN_ENTRY_TYPE_AVATAR_EXP , + DUNGEN_ENTRY_TYPE_WEAPON_PROMOTE, + DUNGEN_ENTRY_TYPE_AVATAR_TALENT , + DUNGEN_ENTRY_TYPE_RELIQUARY , + DUNGEN_ENTRY_TYPE_SCOIN , + DUNGEON_ENTRY_TYPE_OBSCURAE , + DUNGEON_ENTRY_TYPE_NORMAL +} diff --git a/src/main/java/emu/grasscutter/game/dungeons/SettleShowType.java b/src/main/java/emu/grasscutter/game/dungeons/enums/SettleShowType.java similarity index 87% rename from src/main/java/emu/grasscutter/game/dungeons/SettleShowType.java rename to src/main/java/emu/grasscutter/game/dungeons/enums/SettleShowType.java index e860be8d..3d5af54a 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/SettleShowType.java +++ b/src/main/java/emu/grasscutter/game/dungeons/enums/SettleShowType.java @@ -1,4 +1,4 @@ -package emu.grasscutter.game.dungeons; +package emu.grasscutter.game.dungeons.enums; import lombok.Getter; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/BaseCondition.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/BaseCondition.java index 67716f79..edc795d4 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/BaseCondition.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/BaseCondition.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishChallenge.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishChallenge.java index 4c5ad333..40dd40e2 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishChallenge.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishChallenge.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishQuest.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishQuest.java index 55519dba..0e18ddde 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishQuest.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionFinishQuest.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionInTime.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionInTime.java index 282805fa..b387cde2 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionInTime.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionInTime.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillGroupMonster.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillGroupMonster.java index c33022e1..a72eef9d 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillGroupMonster.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillGroupMonster.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonster.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonster.java index 621f1a8b..8faea374 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonster.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonster.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonsterCount.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonsterCount.java index f6125d5a..e12342a5 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonsterCount.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillMonsterCount.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillTypeMonster.java b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillTypeMonster.java index f6a4c5fc..c5a83452 100644 --- a/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillTypeMonster.java +++ b/src/main/java/emu/grasscutter/game/dungeons/pass_condition/ConditionKillTypeMonster.java @@ -1,7 +1,7 @@ package emu.grasscutter.game.dungeons.pass_condition; import emu.grasscutter.data.excels.DungeonPassConfigData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonValue; import emu.grasscutter.game.dungeons.handlers.DungeonBaseHandler; diff --git a/src/main/java/emu/grasscutter/game/entity/EntityMonster.java b/src/main/java/emu/grasscutter/game/entity/EntityMonster.java index b7055498..43956806 100644 --- a/src/main/java/emu/grasscutter/game/entity/EntityMonster.java +++ b/src/main/java/emu/grasscutter/game/entity/EntityMonster.java @@ -5,7 +5,7 @@ import emu.grasscutter.data.common.PropGrowCurve; import emu.grasscutter.data.excels.EnvAnimalGatherConfigData; import emu.grasscutter.data.excels.MonsterCurveData; import emu.grasscutter.data.excels.MonsterData; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.player.Player; import emu.grasscutter.game.props.ActionReason; import emu.grasscutter.game.props.EntityIdType; diff --git a/src/main/java/emu/grasscutter/game/quest/GameQuest.java b/src/main/java/emu/grasscutter/game/quest/GameQuest.java index c15e0391..3c4a4c74 100644 --- a/src/main/java/emu/grasscutter/game/quest/GameQuest.java +++ b/src/main/java/emu/grasscutter/game/quest/GameQuest.java @@ -28,7 +28,7 @@ import javax.script.Bindings; import java.util.HashMap; import java.util.Map; -import static emu.grasscutter.game.dungeons.DungeonPassConditionType.DUNGEON_COND_FINISH_QUEST; +import static emu.grasscutter.game.dungeons.enums.DungeonPassConditionType.DUNGEON_COND_FINISH_QUEST; import static emu.grasscutter.game.quest.enums.QuestCond.QUEST_COND_STATE_EQUAL; import static emu.grasscutter.game.quest.enums.QuestContent.QUEST_CONTENT_FINISH_PLOT; import static emu.grasscutter.game.quest.enums.QuestContent.QUEST_CONTENT_QUEST_STATE_EQUAL; diff --git a/src/main/java/emu/grasscutter/game/world/Scene.java b/src/main/java/emu/grasscutter/game/world/Scene.java index a67871cb..de77f417 100644 --- a/src/main/java/emu/grasscutter/game/world/Scene.java +++ b/src/main/java/emu/grasscutter/game/world/Scene.java @@ -8,7 +8,7 @@ import emu.grasscutter.data.binout.routes.Route; import emu.grasscutter.data.excels.*; import emu.grasscutter.game.avatar.Avatar; import emu.grasscutter.game.dungeons.DungeonManager; -import emu.grasscutter.game.dungeons.DungeonPassConditionType; +import emu.grasscutter.game.dungeons.enums.DungeonPassConditionType; import emu.grasscutter.game.dungeons.DungeonSettleListener; import emu.grasscutter.game.entity.*; import emu.grasscutter.game.entity.gadget.GadgetWorktop; diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLib.java b/src/main/java/emu/grasscutter/scripts/ScriptLib.java index 0cb56a9c..403c45c5 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLib.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLib.java @@ -4,6 +4,7 @@ import emu.grasscutter.Grasscutter; import emu.grasscutter.data.GameData; import emu.grasscutter.game.activity.ActivityManager; import emu.grasscutter.game.dungeons.challenge.DungeonChallenge; +import emu.grasscutter.game.dungeons.challenge.enums.FatherChallengeProperty; import emu.grasscutter.game.dungeons.challenge.factory.ChallengeFactory; import emu.grasscutter.game.entity.*; import emu.grasscutter.game.entity.gadget.GadgetWorktop; @@ -776,6 +777,12 @@ public class ScriptLib { //TODO implement return 0; } + public int ModifyFatherChallengeProperty(int challengeId, int propertyTypeIndex, int value){ + val propertyType = FatherChallengeProperty.values()[propertyTypeIndex]; + logger.warn("[LUA] Call unimplemented ModifyFatherChallengeProperty with {} {} {}", challengeId, propertyType.name(), value); + //TODO implement + return 0; + } public int AttachChildChallenge(int var1, int var2, int var3, int[] var4, LuaTable var5, LuaTable var6){ logger.warn("[LUA] Call unimplemented AttachChildChallenge with {} {} {} {} {} {}", var1, var2, var3, var4, var5, var6); //TODO implement var6 object has int success, int fail, bool fail_on_wipe diff --git a/src/main/java/emu/grasscutter/scripts/ScriptLoader.java b/src/main/java/emu/grasscutter/scripts/ScriptLoader.java index b514c614..bb6adcdd 100644 --- a/src/main/java/emu/grasscutter/scripts/ScriptLoader.java +++ b/src/main/java/emu/grasscutter/scripts/ScriptLoader.java @@ -1,6 +1,8 @@ package emu.grasscutter.scripts; import emu.grasscutter.Grasscutter; +import emu.grasscutter.game.dungeons.challenge.enums.ChallengeEventMarkType; +import emu.grasscutter.game.dungeons.challenge.enums.FatherChallengeProperty; import emu.grasscutter.game.props.EntityType; import emu.grasscutter.game.quest.enums.QuestState; import emu.grasscutter.scripts.constants.*; @@ -70,6 +72,8 @@ public class ScriptLoader { addEnumByOrdinal(ctx, GroupKillPolicy.values(), "GroupKillPolicy"); addEnumByOrdinal(ctx, SealBattleType.values(), "SealBattleType"); + addEnumByOrdinal(ctx, FatherChallengeProperty.values(), "FatherChallengeProperty"); + addEnumByOrdinal(ctx, ChallengeEventMarkType.values(), "ChallengeEventMarkType"); ctx.globals.set("EventType", CoerceJavaToLua.coerce(new EventType())); // TODO - make static class to avoid instantiating a new class every scene ctx.globals.set("GadgetState", CoerceJavaToLua.coerce(new ScriptGadgetState()));