Current time: 05.01.2025, 12:39 Hello There, Guest! (LoginRegister)
Language: english | russian  

Post Reply 
Threaded Mode | Linear Mode
[Скрипт] Запрет тактики «ударил и сбежал»
Author Message
Berserker Offline
Administrators

Posts: 16680
Post: #1

Если использовалось заклинание, то сбежать до действия следующего отряда не получится.

  1. ZVSE2
  2. ; Name: Forbid Hit'n'Run
  3. ; Author: Berserker aka EtherniDee
  4. ; Engine: ERM 2.0+
  5. ; Requires: ERA 3.9+, Era Erm Framework
  6. ; AI will not be able to retreat or surrender until the next stack turn if any spell was casted.
  7. ; Humans will not be able to retreat or surrender until the next round if any spell was casted.
  8. !?FU(OnBeforeBattleUniversal)&(ERM_FLAG_REAL_BATTLE);
  9. !!VRi^pm.isActionRedirection^:S(FALSE);
  10. !?FU(OnBeforeBattleAction)&i^battle_round^>=(FIRST_NON_TACTICS_ROUND);
  11. !!BG:A?(battleAction:y) Q?(actingSide:y);
  12. !!VR(isRetreatOrSurrender:y):S(FALSE);
  13. !!VR(isRetreatOrSurrender)|(battleAction)=(BATTLE_ACTION_RETREAT)/(battleAction)=(BATTLE_ACTION_SURRENDER):S(TRUE);
  14. !!if&(isRetreatOrSurrender);
  15. !!BH(actingSide):M?(hasCasted:y);
  16. !!if&i^battle_human_%(actingSide)^/(hasCasted);
  17. !!IF:M^%T(pm.hit_and_run_warning)^;
  18. !!BG:A(BATTLE_ACTION_CANCEL);
  19. !!en;
  20. !!el&i^battle_ai_%(actingSide)^/i^battle_hero_%(actingSide)^<>(NO_HERO);
  21. !!if&i^pm.isActionRedirection^;
  22. !!VRi^pm.isActionRedirection^:S(FALSE);
  23. !!BG:A(BATTLE_ACTION_HERO_CAST) Si^pm.actionSpell^ Di^pm.actionDestination^;
  24. !!el&(battleAction)=(BATTLE_ACTION_HERO_CAST);
  25. !!VRi^pm.isActionRedirection^:S(TRUE);
  26. !!BG:A(BATTLE_ACTION_CANCEL) S?i^pm.actionSpell^ D?i^pm.actionDestination^;
  27. !!en;
  28. !!en;


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
03.07.2023 19:45
Find all posts by this user Quote this message in a reply
Archer30 Offline
Moderators

Posts: 1178
Post: #2

This is a great script back a few years ago when people were still fascinated with improved game mechanisms. Yet it may be a bit outdated now since most players just hate to learn new stuff. They would complain if something's not what they expect. 105


Latest ERA mods and scripts in development - My GitHub
16.07.2023 11:21
Find all posts by this user Quote this message in a reply
Berserker Offline
Administrators

Posts: 16680
Post: #3

I just don't like cast and flee tactics both for AI and myself ) Some kind of cheating.


Скачать Герои 3 Эра и всё, что с ней связано / ERA 2.46f для старых модов
Поддержать проект
16.07.2023 15:34
Find all posts by this user Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Forum Jump:

Powered by MyBB Copyright © 2002-2025 MyBB Group