added some missing challenge and dungeon enums

This commit is contained in:
hartie95 2022-11-21 17:28:59 +01:00
parent 2794aebfad
commit 0b05ba151f
32 changed files with 102 additions and 32 deletions

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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
}

View File

@ -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,
}

View File

@ -0,0 +1,6 @@
package emu.grasscutter.game.dungeons.challenge.enums;
public enum ChallengeRecordType {
CHALLENGE_RECORD_TYPE_NONE,
CHALLENGE_RECORD_TYPE_IN_TIME
}

View File

@ -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,
}

View File

@ -0,0 +1,9 @@
package emu.grasscutter.game.dungeons.challenge.enums;
public enum FatherChallengeProperty {
DURATION,
CUR_SUCC,
CUR_FAIL,
SUM_SUCC,
SUM_FAIL
}

View File

@ -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
}

View File

@ -1,4 +1,4 @@
package emu.grasscutter.game.dungeons;
package emu.grasscutter.game.dungeons.enums;
public enum DungeonInvolveType {
INVOLVE_NONE,

View File

@ -1,4 +1,4 @@
package emu.grasscutter.game.dungeons;
package emu.grasscutter.game.dungeons.enums;
public enum DungeonPassConditionType {
DUNGEON_COND_NONE,

View File

@ -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
}

View File

@ -1,4 +1,4 @@
package emu.grasscutter.game.dungeons;
package emu.grasscutter.game.dungeons.enums;
public enum DungeonSubType {
DUNGEON_SUB_NONE,

View File

@ -1,4 +1,4 @@
package emu.grasscutter.game.dungeons;
package emu.grasscutter.game.dungeons.enums;
import lombok.Getter;

View File

@ -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
}

View File

@ -1,4 +1,4 @@
package emu.grasscutter.game.dungeons;
package emu.grasscutter.game.dungeons.enums;
import lombok.Getter;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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

View File

@ -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()));