Commit 64bf53b4 authored by mercury233's avatar mercury233

fix

parent fbf2cf69
......@@ -24,12 +24,12 @@ function c100200182.initial_effect(c)
c:RegisterEffect(e2)
end
function c100200182.lvtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>0 end
if chk==0 then return e:GetHandler():IsLevelAbove(1) and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)>0 end
end
function c100200182.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lv=Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)
if c:IsFaceup() and c:IsRelateToEffect(e) and lv>0 then
if c:IsFaceup() and c:IsRelateToEffect(e) and c:IsLevelAbove(1) and lv>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
......
......@@ -32,6 +32,7 @@ function c100266021.initial_effect(c)
e3:SetCondition(c100266021.spcon)
e3:SetTarget(c100266021.sptg)
e3:SetOperation(c100266021.spop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
c100266021.xyz_number=1
......@@ -55,22 +56,27 @@ end
function c100266021.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_STANDBY then
e:SetLabel(Duel.GetTurnCount())
c:RegisterFlagEffect(100266021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,2)
c:RegisterFlagEffect(100266021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
else
e:SetLabel(0)
c:RegisterFlagEffect(100266021,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,1)
end
end
function c100266021.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(100266021)==1
return Duel.GetTurnPlayer()==tp and e:GetHandler():GetFlagEffect(100266021)>0
and e:GetLabelObject():GetLabel()~=Duel.GetTurnCount()
end
function c100266021.damfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetAttack()>0
end
function c100266021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
local g=Duel.GetMatchingGroup(c100266021.damfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,c)
local dam=g:GetSum(Card.GetAttack)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c100266021.damfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:GetAttack()>0
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c100266021.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -31,7 +31,7 @@ end
function c100266022.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp)
return bc and (bc:IsControler(1-tp) or bc:IsType(TYPE_TOKEN) and bc:GetPreviousControler()==1-tp)
end
function c100266022.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x24a)
......
......@@ -31,7 +31,7 @@ end
function c100266023.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp)
return bc and (bc:IsControler(1-tp) or bc:IsType(TYPE_TOKEN) and bc:GetPreviousControler()==1-tp)
end
function c100266023.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x24a)
......
......@@ -31,7 +31,7 @@ end
function c100266024.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp)
return bc and (bc:IsControler(1-tp) or bc:IsType(TYPE_TOKEN) and bc:GetPreviousControler()==1-tp)
end
function c100266024.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x24a)
......
......@@ -31,7 +31,7 @@ end
function c100266025.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return bc and bc:IsControler(1-tp)
return bc and (bc:IsControler(1-tp) or bc:IsType(TYPE_TOKEN) and bc:GetPreviousControler()==1-tp)
end
function c100266025.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x24a)
......
......@@ -63,7 +63,7 @@ function c100266026.cpop(e,tp,eg,ep,ev,re,r,rp)
end
function c100266026.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0) and re:IsActiveType(TYPE_XYZ) and re:GetHandler():IsSetCard(0x24a)
and ep==e:GetOwnerPlayer()
and ep==e:GetOwnerPlayer() and re:GetActivateLocation()&LOCATION_MZONE~=0
end
function c100266026.rop(e,tp,eg,ep,ev,re,r,rp)
return ev
......
......@@ -83,7 +83,7 @@ function c100424018.spop2(e,tp,eg,ep,ev,re,r,rp)
--cannot attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_PLAYER_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(LOCATION_MZONE,0)
......@@ -93,7 +93,6 @@ function c100424018.spop2(e,tp,eg,ep,ev,re,r,rp)
--check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetOperation(c100424018.checkop)
......
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