Commit 4ee1967d authored by POLYMER's avatar POLYMER

fix

parent 51f7d8cd
......@@ -24,7 +24,7 @@ function c10111149.initial_effect(c)
end
c10111149.has_text_type=TYPE_UNION
function c10111149.ffilter(c,fc,sub,mg,sg)
return c:IsFusionType(TYPE_NORMAL) and c:IsLevelAbove(4)
return c:IsFusionType(TYPE_NORMAL) and c:IsLevelBelow(4)
end
function c10111149.tgcon(e)
return e:GetHandler():IsDefensePos()
......
......@@ -33,8 +33,7 @@ function c71500100.initial_effect(c)
--xx
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCountLimit(1,21500100)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCost(c71500100.cost)
e3:SetTarget(c71500100.xxtg)
e3:SetOperation(c71500100.xxop)
......@@ -148,32 +147,60 @@ function c71500100.xxtg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c71500100.xxop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local te=e:GetLabelObject()
if te then te:Reset() end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TOSS_COIN_NEGATE)
e1:SetCode(EVENT_TOSS_DICE_NEGATE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetLabel(0)
e1:SetCondition(c71500100.coincon)
e1:SetOperation(c71500100.coinop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetOperation(c71500100.coinop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
e:SetLabelObject(e1)
Duel.RegisterFlagEffect(tp,71500100,RESET_PHASE+PHASE_END,0,2)
end
function c71500100.coincon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetFlagEffectLabel(tp,71500100)<3
function c71500100.coincon(e,tp,eg,ep,ev,re,r,rp)
local x=e:GetLabel()
return ep==tp and x<3 and Duel.GetFlagEffect(tp,71500100)~=0
end
function c71500100.coinop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffectLabel(tp,71500100)>=3 then return end
if Duel.SelectYesNo(tp,aux.Stringid(71500100,0)) then
Duel.Hint(HINT_CARD,0,71500100)
local flag=Duel.GetFlagEffectLabel(tp,71500100)
if flag==nil then
Duel.RegisterFlagEffect(tp,71500100,RESET_PHASE+PHASE_END,0,1,1)
else
Duel.SetFlagEffectLabel(tp,71500100,flag+1)
end
Duel.TossCoin(tp,ev)
end
local x=e:GetLabel()
if x>=3 then return end
while x<3 and Duel.SelectYesNo(tp,aux.Stringid(71500100,0)) do
Duel.Hint(HINT_CARD,0,71500100)
x=x+1
e:SetLabel(x)
Duel.TossDice(tp,ev)
end
if x<3 then
Debug.Message(x)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TOSS_DICE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetLabel(x)
e1:SetOperation(c71500100.xcoinop)
Duel.RegisterEffect(e1,tp)
end
end
function c71500100.xcoinop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local x=e:GetLabel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TOSS_DICE_NEGATE)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetCountLimit(1)
e1:SetLabel(x)
e1:SetCondition(c71500100.coincon)
e1:SetOperation(c71500100.coinop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
......
......@@ -88,9 +88,9 @@ function c71500103.chop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c71500103.repop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(1-tp,Card.IsAbleToHand,tp,0,LOCATION_DECK,1,1,nil)
local dg=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
if sg:GetCount()>0 and Duel.SendtoHand(sg,1-tp,REASON_EFFECT)~=0 and dg:GetCount()>0 then
local sg=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil)
local dg=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
if sg:GetCount()>0 and Duel.SendtoHand(sg,tp,REASON_EFFECT)~=0 and dg:GetCount()>0 then
Duel.Destroy(dg,REASON_EFFECT)
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