Commit c8e80a62 authored by VanillaSalt's avatar VanillaSalt

fix

parent 07e925ec
......@@ -48,13 +48,13 @@ function c23187256.xyzcon(e,c,og)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
local ct=math.max(1,-ft)
local mg=Duel.GetMatchingGroup(c23187256.mfilter,tp,LOCATION_MZONE,0,nil,c)
return mg:IsExists(c23187256.xyzfilter1,1,nil,mg,ct)
end
function c23187256.xyzop(e,tp,eg,ep,ev,re,r,rp,c,og)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft
local ct=math.max(1,-ft)
local mg=Duel.GetMatchingGroup(c23187256.mfilter,tp,LOCATION_MZONE,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=mg:FilterSelect(tp,c23187256.xyzfilter1,1,1,nil,mg,ct)
......
......@@ -36,17 +36,18 @@ function c36076683.atkop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetCondition(c36076683.rdcon)
e2:SetOperation(c36076683.rdop)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CHANGE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(0,1)
e2:SetValue(c36076683.damval)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
function c36076683.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c36076683.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
function c36076683.damval(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 and rc==e:GetHandler() then
return dam/2
else return dam end
end
......@@ -25,11 +25,12 @@ function c37364101.initial_effect(c)
c:RegisterEffect(e3)
--damage change
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e4:SetCondition(c37364101.damcon)
e4:SetOperation(c37364101.damop)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(0,1)
e4:SetValue(c37364101.damval)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
......@@ -76,11 +77,10 @@ end
function c37364101.atkval(e,c)
return Duel.GetOverlayCount(e:GetHandlerPlayer(),1,0)*600
end
function c37364101.damcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst()==e:GetHandler():GetEquipTarget() and ep~=tp and eg:GetFirst():GetBattleTarget()~=nil
end
function c37364101.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
function c37364101.damval(e,re,dam,r,rp,rc)
if bit.band(r,REASON_BATTLE)~=0 and rc==e:GetHandler():GetEquipTarget() and rc:GetBattleTarget()~=nil then
return dam*2
else return dam end
end
function c37364101.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
......
......@@ -60,5 +60,4 @@ function c51196805.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(1-tp,ac)
Duel.DisableShuffleCheck()
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment