传奇生物文档

对MOD开发相关的说明


熔岩吊坠

<pre><code class="language-python">extends Item func init(): name = "熔岩吊坠" type = config.EQUITYPE_EQUI attInit() att.mgiAtk = 100 info = "技能命中敌方单位时,赋予目标5层[烧灼]\n" info += "攻击命中有10层[烧灼]的单位时,召唤陨石对周围单位造成150%魔法伤害" func _connect(): masCha.connect("onAtkChara",self,"run") func run(atkInfo:AtkInfo): if atkInfo.atkType == Chara.AtkType.SKILL: atkInfo.hitCha.addBuff(b_shaoZhuo.new(5)) if atkInfo.atkType == Chara.AtkType.NORMAL: var bf = atkInfo.hitCha.hasBuff("b_shaoZhuo") if bf != null &amp;&amp; bf.life &gt;= 10 : var eff:Eff = masCha.newEff("sk_yunShi") eff.position = atkInfo.hitCha.position bf.life -= 10 var chas = masCha.getCellChas(atkInfo.hitCha.cell,1) yield(sys.main.get_tree().create_timer(0.45),"timeout") for i in chas: masCha.hurtChara(i,masCha.att.mgiAtk*1.5,Chara.HurtType.MGI,Chara.AtkType.EFF) </code></pre>

页面列表

ITEM_HTML