overlord_event_system/
event.rs

1use chrono::Utc;
2use configs::cheats::CheatScriptId;
3use essences::ability_presets::AbilityPresetId;
4use essences::ad_usage::AdPlacement;
5use essences::autochest::{AutoChestFilter, AutoChestFilterId};
6use essences::currency::{CurrencyConsumer, CurrencySource, CurrencyUnit};
7use essences::dungeons::DungeonTemplateId;
8use essences::entity::{Coordinates, EntityAttributes, EntityId};
9use essences::fighting::{EntityTeam, FightTemplateId};
10use essences::game::EntityTemplateId;
11use essences::gift::Gift;
12use essences::items::{Item, ItemTemplateId, ItemType};
13use essences::offers::{Offer, OfferId, OfferTemplateId};
14use essences::pets::{EquippedPets, PetCaseRollType, PetDrop, PetId, PetSlotId, UpgradedPetsMap};
15use essences::prelude::*;
16use essences::pvp::PVPState;
17use essences::quest::QuestGroupType;
18use essences::skins::SkinId;
19use essences::talent_tree::TalentId;
20use essences::vassals::Suzerain;
21use essences::vassals::VassalTask;
22use essences::{
23    abilities::{
24        AbilityCaseRollType, AbilityDrop, AbilityId, AbilitySlotId, EquippedAbilities,
25        UpgradedAbilitiesMap,
26    },
27    bundles::BundleId,
28};
29use event_system::derive::Event;
30use event_system::derive::RhaiEnum;
31pub use event_system::event::Event;
32use event_system::event::{EventRhaiEnum, EventStruct, EventVec};
33use event_system::script::scope::ScriptScope;
34use schemars::JsonSchema;
35
36use crate::script::CustomEventData;
37
38#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Tsify)]
39#[tsify(from_wasm_abi, into_wasm_abi)]
40pub enum AdRewardType {
41    AfkInstant,
42    AfkBoost,
43    DailyBooster,
44    UpgradeSpeedup,
45    FreeAbilityCaseOpen,
46    FreePetCaseOpen,
47    DungeonRaid {
48        dungeon_id: DungeonTemplateId,
49        difficulty: i64,
50    },
51    ArenaRefresh,
52    ClaimBirdReward {
53        variant_id: configs::ads_settings::BirdVariantId,
54    },
55}
56
57#[derive(
58    PartialEq,
59    Eq,
60    Clone,
61    Debug,
62    Event,
63    RhaiEnum,
64    JsonSchema,
65    Tsify,
66    Serialize,
67    Deserialize,
68    strum_macros::Display,
69    strum_macros::VariantNames,
70)]
71#[tsify(into_wasm_abi, from_wasm_abi, namespace)]
72pub enum OverlordEvent {
73    // Item Case
74    #[event_type(client)]
75    OpenItemCase {
76        batch_size: i64,
77    },
78    AutoChestOpenItemCase {
79        batch_size: i64,
80    },
81    PlayerNewItems {
82        items: Vec<Item>,
83    },
84    #[event_type(client)]
85    PlayerEquipItem {
86        item_id: Uuid,
87    },
88    #[event_type(client)]
89    SellItem {
90        item_id: Uuid,
91    },
92    ItemSold {
93        item_id: Uuid,
94    },
95    #[event_type(client, sync)]
96    UpgradeItemCase {},
97    ItemCaseUpgraded {},
98    #[event_type(client, sync)]
99    SpeedupUpgradeItemCase {},
100    #[event_type(client, sync)]
101    SkipUpgradeItemCase {},
102    #[event_type(client, sync)]
103    ClaimUpgradeItemCase {},
104
105    #[event_type(client)]
106    EnableAutoSell {},
107
108    #[event_type(client)]
109    DisableAutoSell {},
110
111    #[event_type(client)]
112    SetGearOverrideEnabled {
113        item_type: ItemType,
114        enabled: bool,
115    },
116
117    // Auto-chest
118    #[event_type(client)]
119    EnableAutoChest {},
120
121    #[event_type(client)]
122    DisableAutoChest {},
123
124    #[event_type(client)]
125    EnableAutoChestFilter {
126        filter_id: AutoChestFilterId,
127    },
128
129    #[event_type(client)]
130    DisableAutoChestFilter {},
131
132    #[event_type(client)]
133    EnableAutoChestPowerCompare {},
134
135    #[event_type(client)]
136    DisableAutoChestPowerCompare {},
137
138    #[event_type(client)]
139    UpdateAutoChestBatchSize {
140        batch_size: i64,
141    },
142
143    #[event_type(client)]
144    NewAutoChestFilter {
145        filter: AutoChestFilter,
146    },
147
148    #[event_type(client)]
149    UpdateAutoChestFilter {
150        updated_filter: AutoChestFilter,
151    },
152
153    #[event_type(client)]
154    RemoveAutoChestFilter {
155        filter_id: AutoChestFilterId,
156    },
157
158    // Ability Case
159    #[event_type(client, sync)]
160    OpenAbilityCase {
161        roll_type: AbilityCaseRollType,
162    },
163
164    /// Обновляет вишлист гачи способностей.
165    /// Список ограничен числом слотов и разрешенными редкостями текущего уровня гачи.
166    #[event_type(client, sync)]
167    SetAbilityGachaWishlist {
168        ability_ids: Vec<AbilityId>,
169    },
170
171    /// Повышает уровень указанного слота способностей за Stardust.
172    #[event_type(client, sync)]
173    UpgradeAbilitySlot {
174        slot_id: u64,
175    },
176
177    AbilityCaseOpened {
178        batch_size: u8,
179    },
180
181    // For frontend display and quest progression
182    NewAbilities {
183        abilities: Vec<AbilityDrop>,
184    },
185
186    #[event_type(client, sync)]
187    FastEquipAbilities {},
188
189    #[event_type(client)]
190    EquipAbility {
191        slot_id: u64,
192        ability_id: AbilityId,
193    },
194
195    #[event_type(client)]
196    UnequipAbility {
197        slot_id: AbilitySlotId,
198    },
199
200    EquipAbilities {
201        equipped_abilities: EquippedAbilities,
202    },
203
204    #[event_type(client, sync)]
205    UpgradeAbility {
206        ability_id: AbilityId,
207    },
208
209    #[event_type(client, sync)]
210    UpgradeAllAbilities {},
211
212    // For frontend display and quests progression
213    UpgradedAbilities {
214        upgraded_abilities: UpgradedAbilitiesMap,
215    },
216
217    UpgradeAbilityCase {},
218
219    CurrencyIncrease {
220        currencies: Vec<CurrencyUnit>,
221        currency_source: CurrencySource,
222    },
223
224    CurrencyDecrease {
225        currencies: Vec<CurrencyUnit>,
226        currency_consumer: CurrencyConsumer,
227    },
228
229    // Level
230    NewCharacterLevel {
231        level: i64,
232    },
233
234    // Fight management
235    #[event_type(client, sync)]
236    StartGame {},
237    #[event_type(client)]
238    PrepareFight {
239        prepare_fight_type: PrepareFightType,
240    },
241    #[event_type(client)]
242    StartFight {
243        fight_id: Uuid,
244    },
245    #[event_type(client)]
246    FightProgress {},
247    EndFight {
248        fight_id: Uuid,
249        is_win: bool,
250        pvp_state: Option<PVPState>,
251    },
252    StageCleared {},
253
254    #[event_type(client, sync)]
255    RaidDungeon {
256        dungeon_id: DungeonTemplateId,
257        difficulty: i64,
258        amount: i64,
259    },
260
261    WaveCleared {},
262
263    // PVP
264    #[event_type(client, sync)]
265    StartVassalPVPSync {
266        opponent_id: Uuid,
267        opponent_suzerain_id: Option<Uuid>,
268    },
269
270    #[event_type(client, sync)]
271    StartArenaPVPSync {
272        opponent_id: Uuid,
273        is_bot: bool,
274    },
275
276    #[event_type(client, sync)]
277    StartArenaRematchSync {
278        match_id: Uuid,
279    },
280
281    #[event_type(client, sync)]
282    RefreshArenaMatchmaking {},
283
284    #[event_type(client, sync)]
285    BuyArenaTicket {},
286
287    // Moving
288    StartMove {
289        entity_id: Uuid,
290        to: Coordinates,
291        duration_ticks: u64,
292    },
293    // Event is delayed, so it must be non_deterministic
294    EndMove {
295        entity_id: Uuid,
296    },
297
298    // Fighting
299    SpawnEntity {
300        id: EntityId,
301        entity_template_id: EntityTemplateId,
302        position: Coordinates,
303        entity_team: EntityTeam,
304        has_big_hp_bar: bool,
305        entity_attributes: EntityAttributes,
306    },
307
308    StartCastAbility {
309        by_entity_id: Uuid,
310        ability_id: AbilityId,
311        pet_id: Option<PetId>,
312    },
313    // Event is delayed, so it must be non_deterministic
314    StartedCastAbility {
315        by_entity_id: Uuid,
316        ability_id: AbilityId,
317        duration_ticks: u64,
318    },
319    CastAbility {
320        by_entity_id: Uuid,
321        to_entity_id: Uuid,
322        ability_id: AbilityId,
323    },
324    StartCastProjectile {
325        by_entity_id: Uuid,
326        to_entity_id: Uuid,
327        projectile_id: Uuid,
328        level: i64,
329        delay: u64,
330    },
331    StartedCastProjectile {
332        by_entity_id: Uuid,
333        to_entity_id: Uuid,
334        projectile_id: Uuid,
335        duration_ticks: u64,
336    },
337    // TODO move all projectiles into state, and make fight_progress manage them, so we dont need deterministic
338    // Event is delayed, so it must be non_deterministic
339    CastProjectile {
340        by_entity_id: Uuid,
341        to_entity_id: Uuid,
342        projectile_id: Uuid,
343        level: i64,
344        projectile_data: CustomEventData,
345    },
346    Damage {
347        entity_id: Uuid,
348        damage: u64,
349        damage_data: CustomEventData,
350    },
351    Heal {
352        entity_id: Uuid,
353        heal: u64,
354    },
355    CounterAttack {
356        by_entity_id: Uuid,
357        to_entity_id: Uuid,
358        duration_ticks: u64,
359    },
360    Multicast {
361        entity_id: Uuid,
362        amount: u64,
363    },
364    Evasion {
365        entity_id: Uuid,
366    },
367    PlayerDeath {},
368    EntityDeath {
369        entity_id: Uuid,
370        reward: Vec<CurrencyUnit>,
371    },
372    EntityIncrAttribute {
373        entity_id: Uuid,
374        attribute: String,
375        delta: i64,
376    },
377    EntityApplyEffect {
378        entity_id: Uuid,
379        effect_id: Uuid,
380    },
381    CastEffect {
382        entity_id: Uuid,
383        effect_id: Uuid,
384    },
385    CastEffectFromEvent {
386        entity_id: Uuid,
387        effect_id: Uuid,
388        caller_event: Box<OverlordEvent>,
389    },
390    FightCustomEvent {
391        entity_id: u64,
392        value: String,
393    },
394    FightVisualEvent {
395        effect_type: String,
396        effect_data: CustomEventData,
397    },
398
399    SetMaxHp {
400        entity_id: EntityId,
401        new_max_hp: u64,
402        new_hp: u64,
403    },
404
405    // Vassal Links
406    #[event_type(client, sync)]
407    ClaimVassalReward {
408        character_id: Uuid,
409    },
410
411    #[event_type(client, sync)]
412    ClaimSuzerainReward {},
413
414    NewSuzerain {
415        new_suzerain: Option<Suzerain>,
416    },
417
418    RemoveVassal {
419        vassal_id: Uuid,
420    },
421
422    // Vassal Tasks
423    #[event_type(client, sync)]
424    GiveTask {
425        vassal_id: Uuid,
426        template_task_id: Uuid,
427    },
428
429    NewTask {
430        new_task: VassalTask,
431    },
432
433    #[event_type(client)]
434    AcceptTask {
435        task_id: Uuid,
436        is_good: bool,
437    },
438
439    TaskAccepted {
440        task_id: Uuid,
441        started_good: bool,
442        started_at: chrono::DateTime<Utc>,
443        finish_at: chrono::DateTime<Utc>,
444    },
445
446    #[event_type(client)]
447    HitHands {
448        task_id: Uuid,
449    },
450
451    HandsHitted {
452        task_id: Uuid,
453    },
454
455    TaskFinished {
456        task_id: Uuid,
457    },
458
459    #[event_type(client)]
460    ClaimTaskReward {
461        task_id: Uuid,
462    },
463
464    // Resist Task
465    GiveResistTask {
466        new_resist_task: VassalTask,
467    },
468
469    #[event_type(client, sync)]
470    AcceptResistTask {},
471
472    ResistTaskAccepted {
473        new_resist_task: VassalTask,
474    },
475
476    #[event_type(client)]
477    CatchResistTask {
478        task_id: Uuid,
479    },
480
481    ResistTaskCatched {
482        task_id: Uuid,
483    },
484
485    ResistTaskFinished {
486        task_id: Uuid,
487    },
488
489    #[event_type(client)]
490    ClaimResistTaskReward {
491        task_id: Uuid,
492    },
493
494    // Custom value
495    SetCustomValue {
496        key: String,
497        value: i64,
498    },
499
500    // Connection store
501    SetConnectionStore {
502        key: String,
503        value: i64,
504    },
505
506    // Quest
507    #[event_type(client)]
508    ClaimQuest {
509        quest_id: Uuid,
510    },
511
512    #[event_type(client, sync)]
513    ClaimAllQuests {
514        quest_group_type: QuestGroupType,
515    },
516
517    PatronQuestCompleted {
518        quest_id: Uuid,
519    },
520
521    HiddenQuestCompleted {
522        quest_id: Uuid,
523    },
524
525    QuestCompleted {
526        quest_id: Uuid,
527    },
528
529    NewQuests {
530        quest_ids: Vec<Uuid>,
531    },
532
533    // Triggered when loop task flow breaks
534    UpdateActiveLoopTaskId {
535        quest_id: Uuid,
536    },
537
538    ResetRepeatingQuests {
539        quest_ids: Vec<Uuid>,
540    },
541
542    #[event_type(client)]
543    ClaimQuestProgressionReward {
544        quest_group_type: QuestGroupType,
545    },
546
547    // Referrals
548    #[event_type(client)]
549    ClaimReferralLvlUpReward {
550        level: i64,
551    },
552
553    #[event_type(client)]
554    ClaimReferralDailyReward {},
555
556    ReferralDailyRewardStatusUpdate {
557        referral_daily_reward_status: bool,
558    },
559
560    // Gifts
561    #[event_type(client)]
562    SendGift {
563        receiver_id: Uuid,
564        config_gift_id: Uuid,
565    },
566
567    NewGift {
568        new_gift: Gift,
569    },
570
571    #[event_type(client)]
572    AcceptGift {
573        gift_id: Uuid,
574    },
575
576    // AfkReward
577    #[event_type(client, sync)]
578    ClaimAfkReward {},
579
580    AfkRewardClaimed {},
581
582    /// Emitted when the player crosses the AFK rewards unlock chapter threshold
583    /// and the async handler has adjusted `last_afk_reward_claimed_at` so that
584    /// the elapsed time is not less than `min_required_time_sec`.
585    /// The side effect handler persists the new value to the database.
586    AfkRewardsGatingUnlocked {},
587
588    #[event_type(client, sync)]
589    ClaimAfkInstantRewardGems {},
590
591    // Ad Rewards
592    #[event_type(client, sync)]
593    WatchAd {
594        ad_reward_type: AdRewardType,
595    },
596
597    ShowBird {
598        variant_id: configs::ads_settings::BirdVariantId,
599    },
600
601    /// Отправляется клиентом, когда птица была успешно показана игроку.
602    /// Переводит птицу в полный кулдаун.
603    #[event_type(client)]
604    BirdShown {},
605
606    ResetAdUsage {
607        placements: Vec<AdPlacement>,
608    },
609
610    ResetInstantRewardGemsPressCount {},
611
612    // Bundles
613    #[event_type(client, sync)]
614    ClaimBundleStepGeneric {},
615
616    AddBundleGroup {
617        bundle_ids: Vec<BundleId>,
618        // Origin of the bundle — propagates through claim so currency analytics
619        // sees the real source (e.g. `QuestClaim`) instead of the generic
620        // `BundleClaim`.
621        //
622        // `#[serde(skip)]` keeps this server-only. The event still flows
623        // through `ServerTick.events` over bincode to the client, but the field
624        // is omitted from the wire so the layout matches what pre-PR clients
625        // already know. The server always constructs this event with `source`
626        // populated at the call site, then consumes it in
627        // `handle_add_bundle_group` before any wire encoding happens, so the
628        // skip never loses real data.
629        #[serde(skip)]
630        source: essences::currency::CurrencySource,
631    },
632
633    // Classes
634    #[event_type(client, sync)]
635    ChangeClass {
636        new_class_id: uuid::Uuid,
637    },
638
639    // User Account
640    #[event_type(client, sync)]
641    LinkGuestAccount {
642        token: String,
643    },
644
645    #[event_type(client, sync)]
646    SetUsername {
647        username: String,
648    },
649
650    #[event_type(client, sync)]
651    SetCharacterBlocked {
652        character_id: Uuid,
653        blocked: bool,
654    },
655
656    // Ability Presets
657    #[event_type(client, sync)]
658    CreateAbilityPreset {
659        name: Option<String>,
660        ability_ids: Vec<AbilityId>,
661        index: i64,
662    },
663
664    #[event_type(client, sync)]
665    EditAbilityPreset {
666        preset_id: AbilityPresetId,
667        name: String,
668        ability_ids: Vec<AbilityId>,
669    },
670
671    EnableCaseUpgradePopUp {},
672
673    #[event_type(client)]
674    DisableCaseUpgradePopUp {},
675
676    // Skins
677    #[event_type(client, sync)]
678    BuySkins {
679        skin_ids: Vec<SkinId>,
680        equip: bool,
681    },
682
683    #[event_type(client, sync)]
684    EquipAndUnequipSkins {
685        equip_skin_ids: Vec<SkinId>,
686        unequip_skin_ids: Vec<SkinId>,
687    },
688
689    // Cheat
690    #[event_type(client)]
691    RunCheat {
692        cheat: Cheat,
693    },
694
695    // Mail
696    #[event_type(client, sync)]
697    ClaimMail {
698        mail_id: essences::mail::MailId,
699    },
700
701    #[event_type(client, sync)]
702    ClaimAllMails {},
703
704    #[event_type(client, sync)]
705    MakeRead {
706        mail_id: essences::mail::MailId,
707    },
708
709    #[event_type(client, sync)]
710    MakeAllRead {},
711
712    #[event_type(client, sync)]
713    DeleteMail {
714        mail_id: essences::mail::MailId,
715    },
716
717    #[event_type(client, sync)]
718    DeleteAllMails {},
719
720    NewMail {
721        new_mail: essences::mail::Mail,
722    },
723
724    // Offers
725    #[event_type(client, sync)]
726    NewOffer {
727        offer_template_id: OfferTemplateId,
728    },
729
730    #[event_type(client, sync)]
731    BuyOffer {
732        purchase_token: Option<String>,
733        offer_id: OfferId,
734    },
735
736    OfferPurchaseCompleted {
737        purchase_token: String,
738        offer_id: OfferId,
739    },
740
741    OfferPurchaseFailed {
742        purchase_token: String,
743        offer_id: OfferId,
744    },
745
746    PurchasesBanned {},
747
748    ResetOffers {
749        new_offers: Vec<Offer>,
750    },
751
752    // Pets
753    #[event_type(client)]
754    EquipPet {
755        slot_id: u64,
756        pet_id: PetId,
757    },
758
759    #[event_type(client)]
760    UnequipPet {
761        slot_id: PetSlotId,
762    },
763
764    #[event_type(client, sync)]
765    FastEquipPets {},
766
767    EquipPets {
768        equipped_pets: EquippedPets,
769    },
770
771    #[event_type(client, sync)]
772    UpgradePet {
773        pet_id: PetId,
774    },
775
776    #[event_type(client, sync)]
777    UpgradeAllPets {},
778
779    // For frontend display and quests progression
780    UpgradedPets {
781        upgraded_pets: UpgradedPetsMap,
782    },
783
784    #[event_type(client)]
785    UpgradePetSlot {
786        slot_id: u64,
787    },
788
789    // Pet Case (Gacha)
790    #[event_type(client, sync)]
791    OpenPetCase {
792        roll_type: PetCaseRollType,
793    },
794
795    /// Обновляет вишлист гачи петов.
796    #[event_type(client, sync)]
797    SetPetGachaWishlist {
798        pet_ids: Vec<PetId>,
799    },
800
801    PetCaseOpened {
802        batch_size: u8,
803    },
804
805    // For frontend display and quest progression
806    NewPets {
807        pets: Vec<PetDrop>,
808    },
809
810    UpgradePetCase {},
811
812    // Tutorial
813    #[event_type(client)]
814    TutorialShown {
815        step_number: i16,
816    },
817    #[event_type(client)]
818    TutorialStepCompleted {
819        step_number: i16,
820    },
821
822    /// Client lifecycle transition used for churn diagnostics.
823    /// Sent when the Unity app is paused/resumed or loses/regains focus.
824    #[event_type(client)]
825    ClientLifecycle {
826        lifecycle_status: String,
827        active_screen_code: String,
828        session_uptime_secs: i64,
829        current_chapter_level: i64,
830        current_character_level: i64,
831        current_power: i64,
832        active_fight: bool,
833        active_fight_current_wave: i64,
834    },
835
836    // Party
837    #[event_type(client, sync)]
838    AddCharacterToParty {
839        character_id: uuid::Uuid,
840    },
841    #[event_type(client, sync)]
842    RemoveCharacterFromParty {},
843    #[event_type(client, sync)]
844    RefreshPartyPlayers {},
845    #[event_type(sync)]
846    RefreshPartyMemberState {},
847
848    // Talent Tree
849    /// Начать изучение следующего уровня таланта (клиент -> бэкенд).
850    #[event_type(client, sync)]
851    StartTalentResearch {
852        talent_id: TalentId,
853    },
854    /// Бэкенд подтверждает начало изучения таланта.
855    TalentResearchStarted {
856        talent_id: TalentId,
857        finish_at: chrono::DateTime<chrono::Utc>,
858    },
859    /// Ускорить изучение таланта с помощью таймскип-билетика.
860    #[event_type(client, sync)]
861    SpeedupTalentResearch {},
862    /// Пропустить оставшееся время изучения за валюту (брюли/таймскипы).
863    #[event_type(client, sync)]
864    SkipTalentResearch {},
865    /// Забрать завершённый талант (после истечения таймера). Эмитируется бэкендом автоматически.
866    ClaimTalentResearch {},
867
868    // Statue
869    /// Откатить незаблокированные слоты статуи. Списывает валюту, начисляет опыт статуе.
870    #[event_type(client, sync)]
871    StatueRoll {
872        set_index: u8,
873        locked_slot_indices: Vec<u8>,
874    },
875    /// Сделать указанный сет статуи активным ("In Use").
876    #[event_type(client, sync)]
877    StatueActivateSet {
878        set_index: u8,
879    },
880    /// Добавить новый сет статуи (если уровень статуи позволяет).
881    #[event_type(client, sync)]
882    StatueAddSet {},
883    /// Переименовать сет статуи.
884    #[event_type(client, sync)]
885    StatueRenameSet {
886        set_index: u8,
887        name: String,
888    },
889    /// Заблокировать или разблокировать слот статуи.
890    #[event_type(client, sync)]
891    StatueLockSlot {
892        set_index: u8,
893        slot_index: u8,
894        is_locked: bool,
895    },
896    /// Бесплатный первичный ролл для нового слота на любом сете (после создания сета или повышения уровня статуи).
897    #[event_type(client, sync)]
898    StatueRollNewSlot {
899        set_index: u8,
900        slot_index: u8,
901    },
902
903    // User Rating
904    /// User rated the game (1–5) or declined to rate (rating = None).
905    #[event_type(client)]
906    UserRating {
907        rating: Option<i8>,
908    },
909
910    // Error
911    Error {
912        code: String,
913        message: String,
914    },
915
916    // Debug purposes for rhai
917    #[event_type(client)]
918    CustomRhai {
919        event_type: String,
920        data: CustomEventData,
921    },
922}
923
924#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Tsify)]
925#[tsify(from_wasm_abi, into_wasm_abi)]
926pub enum PrepareFightType {
927    PVEFight,
928    PVPFight {
929        fight_id: FightTemplateId,
930        pvp_state: Box<PVPState>,
931    },
932    RetryBossFight,
933    DungeonFight {
934        dungeon_id: DungeonTemplateId,
935        difficulty: i64,
936    },
937    ForfeitDungeonFight,
938    SingleFight {
939        fight_templated_id: FightTemplateId,
940    },
941}
942
943#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, JsonSchema, Tsify)]
944#[tsify(from_wasm_abi, into_wasm_abi)]
945pub enum Cheat {
946    PauseCombat,
947    UnpauseCombat,
948    GodModeOn,
949    GodModeOff,
950    GetRich,
951    ClearInventory,
952    ClearSlot {
953        item_id: Uuid,
954    },
955    GetAllSpells,
956    SetChapter {
957        chapter: i64,
958    },
959    StartFight {
960        templated_id: FightTemplateId,
961    },
962    SpawnEntity {
963        entity_id: EntityTemplateId,
964        x: i64,
965        y: i64,
966        team: EntityTeam,
967        attributes: Vec<(String, i64)>,
968    },
969    WearItems {
970        items_ids: Vec<ItemTemplateId>,
971    },
972    EquipSkin {
973        skin_id: SkinId,
974    },
975    UnequipSkin {
976        skin_id: SkinId,
977    },
978    NewLevel {
979        level: i64,
980    },
981    Script {
982        script_id: CheatScriptId,
983    },
984}