匠心精神
![Rank: 12](static/image/common/star_level3.gif) ![Rank: 12](static/image/common/star_level3.gif) ![Rank: 12](static/image/common/star_level3.gif)
- 贡献度
- 304
- 金元
- 367799
- 积分
- 38036
- 精华
- 4
- 注册时间
- 2020-4-22
![你开心就好[永久版]](static/image/common/medal271.gif)
|
本帖最后由 挽云揽月 于 2023-12-31 12:54 编辑
实测结果:
1、添加战斗类称号BUFF【天煞孤星】效果是生效了,伤害比系统自带【天煞孤星】要高。
2、其他仅测试添加战斗类称号BUFF【传奇之人】无法生效。
3、其他常驻效果类【身无长物】无法生效。
大神不用太过费心了,就现有的功能来说个人感觉你这个MOD应该就已经是功能MOD第一了。
其实昨天我自己测试了自己做的MOD,测试过程如下:
1、直接unit.AddBuff("nick028buff")是不会使【天煞孤星】生效的
2、--50%機率發動左右互搏与unit.AddBuff("nick610buff")【传奇之人】50%连击会叠加生效,有可能出现一击后无限自动连直接一击打死的情况,太过变态。
3、直接使用【天煞孤星】相应编码会导致左右互搏失效(并会导致其他添加的称号如传奇之人失效),且伤害减伤效果即使使用编码也无效。
4、把MOD内文件改为nick028也是无法生效的。
测试MOD结果综述:【天煞孤星】称号比较特殊,易于其他称号及BUFF冲突,但只要不添加【天煞孤星】称号,绝大部分称号及BUFF都可以生效。
此MOD尚有一个问题没有解决,就是【攻击后回精】数量无法添加,不知有无大神可以对我下面【攻击后回精】进行修改可以使之生效:
function AfterAttack(skill, info ,attacker)
unit.AP = unit.AP + 2
end
附上自己的MOD内容,除了【攻击后回精】外所有自己想要的功能已经全部有了,我是添加在nick001.txt【再世神农】称号上,因开局可以直接选择回答获得:
-- 慈悲为怀
function BeginBattle()
unit.AddBuff("nick607buff")
end
-- 獲得金錢加倍
function MoneyGet(e)
e.Count = math.floor( e.Count * 2)
end
--50%機率發動左右互搏
local isluanch = false;
function AfterAttack(skill, info ,attacker)
local dead = 0
for i = 1, #info.damage do
if info.damage.target.IsDead then
dead = dead+1
end
end
if dead ~= #info.damage then
if isluanch == false then
if math.random() <= 0.5 then
isluanch= true;
controller.CreateAttackEvent(unit, info.damage[1].target,skill,false);
end
else
isluanch = false;
end
end
end
--每場戰鬥死亡後復活一次,恢復100%血量並清除身上所有負面數值
local times = 1
function AfterDamage(attack , damage ,info)
if unit.HP <= 0 and times > 0 then
times = 0
unit.HP = unit.MaxHP * 1
unit[Prop.Injured ] = 0
unit[Prop.Wounded ] = 0
unit[Prop.Poisoned ] = 0
unit[Prop.Sealed ] = 0
unit[Prop.Confused ] = 0
unit[Prop.Dazed ] = 0
unit[Prop.Cramped ] = 0
unit[Prop.Sprained ] = 0
unit[Prop.Exhausted] = 0
unit[Prop.Frozen ] = 0
unit[Prop.Drunk ] = 0
end
end
--再世神农,采药100%几率获得4份
function HerbsGet(e)
if math.random() <= 1then --几率
e.Count = e.Count * 4 --倍数
end
end
--淘金矿工,挖矿100%几率获得4份
function StoneGet(e)
if math.random() <= 1 then
e.Count = e.Count * 4
end
end
--透明人,偷竊物品提升的機率偷窃被發現機率減少67%
function StolenInventory(e)
e.Count = 67
end
|
|