Commit f85314ca authored by mercury233's avatar mercury233

fix

parent 0be8b79b
......@@ -65,33 +65,33 @@ function c100277002.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local tgc=e:GetLabelObject()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_UPDATE_ATTACK)
e0:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e0:SetValue(tgc:GetLevel()*300)
tc:RegisterEffect(e0)
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c100277002.checkop)
Duel.RegisterEffect(e1,tp)
--cannot announce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c100277002.atkcon)
e2:SetTarget(c100277002.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c100277002.checkop)
Duel.RegisterEffect(e1,tp)
--cannot announce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c100277002.atkcon)
e2:SetTarget(c100277002.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
function c100277002.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,100277002)~=0 then return end
......
......@@ -54,13 +54,14 @@ function c100416024.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c100416024.scfilter(c)
return c:IsFaceup() and c:IsSetCard(0x265) and c:GetOriginalType()&TYPE_PENDULUM>0
return c:IsFaceup() and c:IsSetCard(0x265) and c:IsLevelAbove(0)
end
function c100416024.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100416024.scfilter,tp,LOCATION_ONFIELD,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c100416024.scfilter,tp,LOCATION_PZONE,0,1,nil) end
end
function c100416024.scop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,c100416024.scfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c100416024.scfilter,tp,LOCATION_PZONE,0,1,1,nil)
local sc=g:GetFirst()
if sc then
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -29,7 +29,7 @@ function c101105203.initial_effect(c)
c:RegisterEffect(e2)
end
function c101105203.spcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c101105203.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -68,17 +68,23 @@ function c101105205.spfilter(c,e,tp)
end
function c101105205.optg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,101105205)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105205.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,101105205+100)==0
local b1=Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,101105205)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101105205.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,101105205+100)==0
if chk==0 then return b1 or b2 end
end
function c101105205.opop(e,tp,eg,ep,ev,re,r,rp)
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.GetFlagEffect(tp,101105205)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c101105205.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.GetFlagEffect(tp,101105205+100)==0
local b1=Duel.IsPlayerCanDraw(tp,1)
and Duel.GetFlagEffect(tp,101105205)==0
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101105205.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,101105205+100)==0
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(101105205,1),aux.Stringid(101105205,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(101105205,1)) --Draw 1 Card
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(101105205,2))+1 --Special Summoned 1 Tuner from your hand
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(101105205,1))
elseif b2 then op=Duel.SelectOption(tp,aux.Stringid(101105205,2))+1
else return end
if op==0 then
Duel.Draw(tp,1,REASON_EFFECT)
......
......@@ -5,7 +5,7 @@ function c101105206.initial_effect(c)
aux.AddCodeList(c,44508094)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101105206)
......@@ -24,23 +24,29 @@ function c101105206.initial_effect(c)
e2:SetOperation(c101105206.lvlop)
c:RegisterEffect(e2)
end
function c101105206.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa3) and c:IsAbleToGrave()
end
function c101105206.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101105206.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
function c101105206.tgfilter(c,check)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa3)
and (c:IsAbleToGrave() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c101105206.cfilter(c)
return c:IsFaceup() and (c:IsCode(44508094) or c:IsType(TYPE_SYNCHRO) and aux.IsCodeListed(c,44508094))
end
function c101105206.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local check=Duel.IsExistingMatchingCard(c101105206.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
return Duel.IsExistingMatchingCard(c101105206.tgfilter,tp,LOCATION_DECK,0,1,nil,check)
end
end
function c101105206.activate(e,tp,eg,ep,ev,re,r,rp)
local chk=Duel.IsExistingMatchingCard(c101105206.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
local check=Duel.IsExistingMatchingCard(c101105206.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c101105206.tgfilter,tp,LOCATION_DECK,0,1,1,nil,chk)
local g=Duel.SelectMatchingCard(tp,c101105206.tgfilter,tp,LOCATION_DECK,0,1,1,nil,check)
local tc=g:GetFirst()
if tc then
if chk and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1152)==1) then
if check and tc:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (not tc:IsAbleToGrave() or Duel.SelectOption(tp,1191,1152)==1) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
else
Duel.SendtoGrave(tc,REASON_EFFECT)
......@@ -48,10 +54,10 @@ function c101105206.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
function c101105206.lvlfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa3)
return c:IsFaceup() and c:IsSetCard(0xa3) and c:IsLevelAbove(0)
end
function c101105206.lvltg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101105206.lvlfilter(chkc) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101105206.lvlfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101105206.lvlfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,c101105206.lvlfilter,tp,LOCATION_MZONE,0,1,1,nil)
......@@ -64,7 +70,7 @@ function c101105206.lvlop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsLevel(1) then
opt=Duel.SelectOption(tp,aux.Stringid(101105206,1))
else
opt=Duel.SelectOption(tp,aux.Stringid(101105206,1),aux.Stringid(101105206,2)) --increase / decrease
opt=Duel.SelectOption(tp,aux.Stringid(101105206,1),aux.Stringid(101105206,2))
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -19,23 +19,42 @@ end
function c101105207.eqfilter(c)
return c:IsFaceup() and c:IsAbleToChangeControler()
end
function c101105207.dafilter(c)
return c101105207.filter(c) and not c:IsHasEffect(EFFECT_DIRECT_ATTACK)
end
function c101105207.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101105207.filter(chkc) end
local b1=Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101105207.eqfilter,tp,0,LOCATION_MZONE,1,nil)
local b2=aux.bpcon()
if chk==0 then return (b1 or b2)
and Duel.IsExistingTarget(c101105207.dafilter,tp,LOCATION_MZONE,0,1,nil)
local b3=aux.bpcon()
if chk==0 then return (b1 or b2 or b3)
and Duel.IsExistingTarget(c101105207.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c101105207.filter,tp,LOCATION_MZONE,0,1,1,nil)
local op
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101105207,0),aux.Stringid(101105207,1),aux.Stringid(101105207,2))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(101105207,0))
else
op=Duel.SelectOption(tp,aux.Stringid(101105207,1),aux.Stringid(101105207,2))+1
b2=aux.bpcon() and not g:GetFirst():IsHasEffect(EFFECT_DIRECT_ATTACK)
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(101105207,0)
opval[off-1]=0
off=off+1
end
if b2 then
ops[off]=aux.Stringid(101105207,1)
opval[off-1]=1
off=off+1
end
if b3 then
ops[off]=aux.Stringid(101105207,2)
opval[off-1]=2
off=off+1
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EFFECT)
local sel=Duel.SelectOption(tp,table.unpack(ops))
local op=opval[sel]
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_EQUIP)
......
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