Skip to content

Commit

Permalink
Updated EEF
Browse files Browse the repository at this point in the history
- Fixed the definition of i^battle_current_side^ and i^battle_acting_side^. Now they are the side of player instead of side of stack (http://wforum.heroes35.net/showthread.php?tid=5624&pid=137744#pid137744)

- Fixed x3 of OnKeyPressed_Battle and all the other sub trigger of OnKeyPressed not working (http://wforum.heroes35.net/showthread.php?tid=541&pid=137741#pid137741)
  • Loading branch information
Archer30 committed Sep 11, 2023
1 parent f04dccb commit 1e0ddca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
12 changes: 6 additions & 6 deletions Era Erm Framework/Data/s/-9999 era - stdlib.erm
Expand Up @@ -24,13 +24,13 @@ ZVSE2
; Implement new events with the same parameters, as OnKeyReleased, but for particular dialogs.
; OnKeyReleased_AdvMap, OnKeyReleased_Battle, OnKeyReleased_HeroScreen, OnKeyReleased_HeroMeetingScreen, OnKeyReleased_Town
!?FU(OnKeyReleased_Quit);
!#VA(key:x) (preventDefault:x);
!#VA(key:x) (preventDefault:x) (isDown:x);
!!SN:F^GetGameState^/?(mainDialogs[2]:y);
!!FU(OnKeyReleased_AdvMap)&(mainDialogs[1])=(DLG_ADVMAP):P?(key)/?(preventDefault);
!!FU(OnKeyReleased_Battle)&(mainDialogs[1])=(DLG_BATTLE):P?(key)/?(preventDefault);
!!FU(OnKeyReleased_HeroScreen)&(mainDialogs[1])=(DLG_HERO_SCREEN):P?(key)/?(preventDefault);
!!FU(OnKeyReleased_HeroMeetingScreen)&(mainDialogs[1])=(DLG_HERO_MEETING_SCREEN):P?(key)/?(preventDefault);
!!FU(OnKeyReleased_Town)&(mainDialogs[1])=(DLG_TOWN_SCREEN):P?(key)/?(preventDefault);
!!FU(OnKeyReleased_AdvMap)&(mainDialogs[1])=(DLG_ADVMAP):P?(key)/?(preventDefault)/(isDown);
!!FU(OnKeyReleased_Battle)&(mainDialogs[1])=(DLG_BATTLE):P?(key)/?(preventDefault)/(isDown);
!!FU(OnKeyReleased_HeroScreen)&(mainDialogs[1])=(DLG_HERO_SCREEN):P?(key)/?(preventDefault)/(isDown);
!!FU(OnKeyReleased_HeroMeetingScreen)&(mainDialogs[1])=(DLG_HERO_MEETING_SCREEN):P?(key)/?(preventDefault)/(isDown);
!!FU(OnKeyReleased_Town)&(mainDialogs[1])=(DLG_TOWN_SCREEN):P?(key)/?(preventDefault)/(isDown);

!!FU(RestorePrevKeyModsState):P;

Expand Down
7 changes: 3 additions & 4 deletions Era Erm Framework/Data/s/9999 era - stdlib.erm
Expand Up @@ -248,17 +248,16 @@ ZVSE2

!?FU(OnBeforeBattleStackTurn);
!#VA(activeStack:x);
!!VRi^battle_current_side^:S(activeStack) :(BATTLE_STACKS_PER_SIDE);
!!BG:Q?i^battle_current_side^;
!!VRi^battle_current_stack^:S(activeStack);

!?FU(OnBattleStackObtainsTurn);
!#VA(stackSide:x) (stackInd:x);
!!VRi^battle_current_side^:S(stackSide);
!!BG:Q?i^battle_current_side^;
!!VRi^battle_current_stack^:S(stackSide) *(BATTLE_STACKS_PER_SIDE) +(stackInd);

!?FU(OnBeforeBattleAction);
!!BG:N?i^battle_acting_stack^;
!!VRi^battle_acting_side^:Si^battle_acting_stack^ :(BATTLE_STACKS_PER_SIDE);
!!BG:N?i^battle_acting_stack^ Q?i^battle_acting_side^;
; ======== END EVENTS ========


Expand Down

0 comments on commit 1e0ddca

Please sign in to comment.