- 积分
- 105315
- 威望
- 85
- 魅力
- 86
- 经验
- 91785
- 热心度
- 28
- 注册时间
- 1970-1-1
- 最后登录
- 2024-11-22
- 主题
- 33
- 回帖
- 5754
- 精华
- 9
- 阅读权限
- 200
成长值: 14215 TA的每日心情 | 郁闷 2024-8-28 13:33 |
---|
签到天数: 1611 天 连续签到: 1 天 [LV.Master]伴坛终老
管理员
ERA Project TeamWoG俄文论坛版主
- 积分
- 105315
|
发表于 2021-6-1 01:41:28
|
显示全部楼层
裸城也不行了?
那我写一下。每回合遍历所有城镇,如果裸城就添加对应的一级兵。战后也会检查。不过有驻守城镇的英雄或者来访英雄都会跳过检查。- ZVSE2
- ; Author: Archer30
- ; Engine: ERM 2.0+
- ; Requires: ERA 3.4+, Era Erm Framework, WoG Scripts (80 base)
- ; Give a 1st level creature native to the town if a town has no creatue at the end of a battle/turn.
- ; ============== SETTINGS ==============
- !#VRi^townguards_on^:S(TRUE); [This script will be activated only if true]
- ; ============ END SETTINGS ============
- !?FU(townguards_RestrainValues);
- !!VRi^townguards_on^:F(FALSE)/(TRUE);
- !#FU(townguards_RestrainValues):P;
- !?FU(WOG_EndOfTurn)&i^townguards_on^;
- !#VA(x:y) (y:y) (z:y);
- !!OW:C?(player:y);
- !!VR(x):S-1;
- !!re i; [loop though all towns]
- !!UN:U(OBJ_TOWN)/(ANY_OBJ)/-1/(x)/(y)/(z);
- !!br&(x)<0;
- !!CA(x)/(y)/(z):O?(owner:y);
- !!CA(x)/(y)/(z):H0/?(garrisonHero:y) H1/?(visitingHero:y); [check for garrison / visiting hero]
- !!FU(townguards_EnsureTownsAreGuarded)&(player)=(owner)/(garrisonHero)=(NO_HERO)/(visitingHero)=(NO_HERO):P(x)/(y)/(z);
- !!en;
- !?FU(OnAfterBattleUniversal)&i^townguards_on^;
- !!OBi^battle_x^/i^battle_y^/i^battle_z^:T?(type:y);
- !!if&(type)=(OBJ_TOWN);
- !!CAi^battle_x^/i^battle_y^/i^battle_z^:H0/?(garrisonHero:y) H1/?(visitingHero:y);
- !!FU(townguards_EnsureTownsAreGuarded)&(garrisonHero)=(NO_HERO)/(visitingHero)=(NO_HERO):Pi^battle_x^/i^battle_y^/i^battle_z^;
- !!en;
- !?FU(townguards_EnsureTownsAreGuarded);
- !#VA(x:x) (y:x) (z:x);
- !#VA(firstLevelMons[9]:y);
- !!VR(firstLevelMons):C(MON_PIKEMAN)/(MON_CENTAUR)/(MON_GREMLIN)/(MON_IMP)/(MON_SKELETON)/(MON_TROGLODYTE)/(MON_GOBLIN)/(MON_GNOLL)/(MON_PIXIE);
- !!re (slotInd:y)/(ARMY_SLOT_FIRST)/(ARMY_SLOT_LAST);
- !!CA(x)/(y)/(z):M2/(slotInd)/?(monType:y)/?(monCount:y);
- !!FU&(monType)<>(NO_MON):E;
- !!en;
- !!CA(x)/(y)/(z):T?(townType:y); [Check type of the town if the town is with no army]
- !!CA(x)/(y)/(z):M2/(ARMY_SLOT_FIRST)/(firstLevelMons[townType])/1; [add in first level creature according to the type of town]
复制代码
|
|