2025-06-04 05:02:57 +08:00

122 lines
2.6 KiB
Plaintext

AttrEffect = class("AttrEffect")
-- AttrEffect=1 魔法傷害免疫 1 << 0
-- AttrEffect=2 物理傷害免疫 1 << 1
-- AttrEffect=3 血量無法恢復 1 << 2
-- AttrEffect=4 魔法無法恢復 1 << 3
-- AttrEffect=5 吟唱不會中斷 1 << 4
-- AttrEffect=6 無視種族傷害 1 << 5
-- AttrEffect=7 無視體型傷害 1 << 6
-- AttrEffect=8 無視屬性傷害 1 << 7
-- AttrEffect=9 無視近戰普攻傷害 1 << 8
-- AttrEffect=10 必定命中且暴擊 1 << 9
-- AttrEffect=17 隱匿狀態 1 << 16
-- AttrEffect=20 無敵狀態 1 << 19
-- AttrEffect=27 致盲狀態 1 << 26
function AttrEffect:ctor()
self:Set(0)
end
function AttrEffect:Set(num)
self.behaviour = num
end
function AttrEffect:Get(flag)
return BitUtil.bandOneZero(self.behaviour,flag)
end
--魔法傷害免疫
function AttrEffect:MagicDamageInvincible()
return self:Get(0) >0
end
--物理傷害免疫
function AttrEffect:PhysicDamageInvincible()
return self:Get(1) >0
end
--血量無法恢復
function AttrEffect:HpDisableRecover()
return self:Get(2) >0
end
--魔法無法恢復
function AttrEffect:MpDisableRecover()
return self:Get(3) >0
end
--吟唱不會中斷
function AttrEffect:SingDisableInterrupt()
return self:Get(4) >0
end
--無視種族傷害
function AttrEffect:IgnoreRaceDamage()
return self:Get(5) >0
end
--無視體型傷害
function AttrEffect:IgnoreShapeDamage()
return self:Get(6) >0
end
--無視屬性傷害
function AttrEffect:IgnoreAttrDamage()
return self:Get(7) >0
end
--無視近戰普攻傷害
function AttrEffect:IgnoreJinzhanDamage()
return self:Get(8) >0
end
--必定命中且暴擊
function AttrEffect:DefiniteHitAndCritical()
return self:Get(9) >0
end
--無敵狀態
function AttrEffect:InvincibleState()
return self:Get(19) >0
end
--致盲狀態
function AttrEffect:BlindnessState()
return self:Get(26) >0
end
AttrEffectB = class("AttrEffectB")
-- AttrEffectB=2 下個區域型技能範圍擴大至x 1 << 1
-- AttrEffectB=8 下一次讀條類技能順發 1 << 7
-- AttrEffectB=16 無法被敵方作為技能目標 1 << 14
-- AttrEffectB=20 處於魔導機械變身狀態 1 << 19
function AttrEffectB:ctor()
self:Reset()
end
function AttrEffectB:Reset()
self.value = 0
end
function AttrEffectB:Set(value)
self.value = value
end
function AttrEffectB:NextPointTargetSkillLargeLaunchRange()
return self.value & 2 > 0
end
function AttrEffectB:NextSkillNoReady()
return self.value & 128 > 0
end
function AttrEffectB:CanNotBeSkillTargetByEnemy()
return self.value & 32768 > 0
end
function AttrEffectB:IsInMagicMachine()
return BitUtil.bandOneZero(self.value,19) > 0
end