Commit be01ab1a authored by Nemo Ma's avatar Nemo Ma

fix

parent c926d656
...@@ -23,7 +23,7 @@ function c114514.initial_effect(c) ...@@ -23,7 +23,7 @@ function c114514.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c114514.rfilter(c,tp) function c114514.rfilter(c,tp)
return c:IsControler(tp) or c:IsFaceup() return c:IsControler(tp) and c:IsFaceup() and not c:IsCode(114514)
end end
function c114514.sumfilter(c) function c114514.sumfilter(c)
return c:GetAttack() return c:GetAttack()
......
...@@ -10,18 +10,28 @@ function c33710903.initial_effect(c) ...@@ -10,18 +10,28 @@ function c33710903.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
if not c33710903.global_check then if not c33710903.global_check then
c33710903.global_check=true c33710903.global_check=true
Count_Time_For_This_Effect={0,0,0,0}
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAINING) ge1:SetCode(EVENT_CHAINING)
ge1:SetOperation(c33710903.checkop) ge1:SetOperation(c33710903.checkop)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_TURN_END)
ge2:SetOperation(c33710903.checkop2)
Duel.RegisterEffect(ge2,0)
end end
end end
function c33710903.checkop(e,tp,eg,ep,ev,re,r,rp) function c33710903.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() Count_Time_For_This_Effect[re:GetHandlerPlayer()+3]=Count_Time_For_This_Effect[re:GetHandlerPlayer()+3]+1
if tc then end
Duel.RegisterFlagEffect(re:GetHandler():GetControler(),16133710903+Duel.GetTurnCount(),RESET_PHASE+PHASE_END,0,2) function c33710903.checkop2(e,tp,eg,ep,ev,re,r,rp)
end Debug.Message(0)
Count_Time_For_This_Effect[1]=Count_Time_For_This_Effect[3]
Count_Time_For_This_Effect[2]=Count_Time_For_This_Effect[4]
Count_Time_For_This_Effect[3]=0
Count_Time_For_This_Effect[4]=0
end end
function c33710903.target(e,tp,eg,ep,ev,re,r,rp,chk) function c33710903.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
...@@ -59,12 +69,13 @@ function c33710903.actlimit(e,te,tp) ...@@ -59,12 +69,13 @@ function c33710903.actlimit(e,te,tp)
and g:GetFirst():IsFaceup() and g:GetFirst():IsFaceup()
end end
function c33710903.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c33710903.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,Duel.GetFlagEffect(1-tp,16133710903+Duel.GetTurnCount()-1)*500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,Count_Time_For_This_Effect[2-tp]*500)
end end
function c33710903.spop(e,tp,eg,ep,ev,re,r,rp) function c33710903.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.Damage(1-tp,Count_Time_For_This_Effect[2-tp]*500,REASON_EFFECT)
Duel.Damage(1-tp,Duel.GetFlagEffect(1-tp,16133710903+Duel.GetTurnCount()-1)*500,REASON_EFFECT) if c:IsRelateToEffect(e) then
Duel.ShuffleHand(tp)
end end
end end
\ No newline at end of file
function c82224002.initial_effect(c) function c82224002.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_SSET) e1:SetHintTiming(TIMINGS_CHECK_MONSTER+TIMING_SSET)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE)
e1:SetCondition(c82224002.con) e1:SetCondition(c82224002.con)
e1:SetOperation(c82224002.activate) e1:SetOperation(c82224002.activate)
e1:SetCost(c82224002.cost) e1:SetCost(c82224002.cost)
e1:SetCountLimit(1,82224002+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,82224002+EFFECT_COUNT_CODE_OATH)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--act in hand --act in hand
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND) e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c82224002.handcon) e2:SetCondition(c82224002.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c82224002.handcon(e) function c82224002.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD)>=5 return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,LOCATION_ONFIELD)>=5
end end
function c82224002.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c82224002.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c82224002.con(e,tp,eg,ep,ev,re,r,rp) function c82224002.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_BATTLE_START or Duel.GetCurrentPhase()==PHASE_BATTLE or Duel.GetCurrentPhase()==PHASE_BATTLE_STEP or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_BATTLE_START or Duel.GetCurrentPhase()==PHASE_BATTLE or Duel.GetCurrentPhase()==PHASE_BATTLE_STEP or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c82224002.activate(e,tp,eg,ep,ev,re,r,rp) function c82224002.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetTurnPlayer() local p=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(82224002,0)) Duel.Hint(HINT_SELECTMSG,p,aux.Stringid(82224002,0))
if Duel.GetCurrentPhase()==PHASE_MAIN1 then if Duel.GetCurrentPhase()==PHASE_MAIN1 then
Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(p,PHASE_MAIN1,RESET_PHASE+PHASE_BATTLE,1)
else else
if Duel.GetCurrentPhase()==PHASE_BATTLE_START or Duel.GetCurrentPhase()==PHASE_BATTLE or Duel.GetCurrentPhase()==PHASE_BATTLE_STEP then if Duel.GetCurrentPhase()==PHASE_BATTLE_START or Duel.GetCurrentPhase()==PHASE_BATTLE or Duel.GetCurrentPhase()==PHASE_BATTLE_STEP then
Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(p,PHASE_BATTLE,RESET_PHASE+PHASE_MAIN2,1)
else else
Duel.SkipPhase(p,PHASE_MAIN2,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(p,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
end end
end end
end 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