Commit 9e8ec06c authored by VanillaSalt's avatar VanillaSalt

fix (1/4)

parent cdaf5efc
......@@ -17,22 +17,25 @@ function c10971759.initial_effect(c)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCost(c10971759.cost)
e2:SetTarget(c10971759.target)
e2:SetOperation(c10971759.operation)
c:RegisterEffect(e2)
end
function c10971759.spfil(c,e,tp)
function c10971759.spfilter(c,e,tp)
return c:GetLevel()==3 and c:IsRace(RACE_INSECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c10971759.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10971759.spfil(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>=2 and Duel.IsExistingTarget(c10971759.spfil,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
local g=Duel.SelectTarget(tp,c10971759.spfil,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c10971759.spfilter(chkc,e,tp) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsExistingTarget(c10971759.spfilter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c10971759.spfilter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0)
end
function c10971759.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
local tc=g:GetFirst()
......
......@@ -18,7 +18,7 @@ end
function c11193246.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c11193246.cfilter,1,nil,tp)
end
function c11193246.thfilter(c,e,tp)
function c11193246.thfilter(c)
return c:IsSetCard(0xdf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c11193246.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -26,15 +26,15 @@ function c11193246.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11193246.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c11193246.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil)
if g:GetCount()>=2 and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:Select(tp,1,1,sg1:GetFirst())
sg1:Merge(sg2)
end
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
\ No newline at end of file
local g=Duel.GetMatchingGroup(c11193246.thfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg1=g:Select(tp,1,1,nil)
if g:GetCount()>=2 and Duel.SelectYesNo(tp,210) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg2=g:Select(tp,1,1,sg1:GetFirst())
sg1:Merge(sg2)
end
Duel.SendtoHand(sg1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg1)
end
......@@ -58,7 +58,7 @@ function c11317977.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11317977.scfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11317977.scop(e,tp,eg,ep,ev,re,r,rp,chk)
function c11317977.scop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11317977.scfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......@@ -70,17 +70,18 @@ function c11317977.thcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_FUSION
end
function c11317977.thfilter2(c)
return c:IsSetCard(0xdf) and not c:IsCode(11317977) and c:IsAbleToHand() and ((c:IsFaceup() and c:IsType(TYPE_MONSTER+TYPE_PENDULUM)) or c:IsType(TYPE_MONSTER))
return c:IsSetCard(0xdf) and not c:IsCode(11317977) and c:IsAbleToHand()
and ((c:IsFaceup() and c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_PENDULUM))
or (c:IsLocation(LOCATION_EXTRA) and c:IsType(TYPE_MONSTER)))
end
function c11317977.thtg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_EXTRA) and chkc:IsControler(tp) and c11317977.thfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c11317977.thfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
function c11317977.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11317977.thfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
end
function c11317977.thop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c11317977.thfilter2,tp,LOCATION_GRAVE+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
......
......@@ -65,4 +65,4 @@ function c11439455.spop2(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
end
......@@ -84,4 +84,4 @@ function c12615446.xyzop(e,tp,eg,ep,ev,re,r,rp)
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
end
end
\ No newline at end of file
end
......@@ -27,13 +27,11 @@ end
function c19254117.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c19254117.deffil(c)
return aux.nzdef(c) and c:IsFaceup()
end
function c19254117.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c19254117.deffil(chkc) end
if chk==0 then return Duel.IsExistingTarget(c19254117.deffil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SelectTarget(tp,c19254117.deffil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.nzdef(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.nzdef,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.nzdef,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c19254117.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......@@ -101,4 +99,4 @@ function c19254117.tgop(e,tp,eg,ep,ev,re,r,rp)
end
function c19254117.attg(e,c)
return c:GetRealFieldID()~=e:GetLabel()
end
\ No newline at end of file
end
......@@ -21,11 +21,10 @@ function c23160024.initial_effect(c)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_DRAW)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_SZONE)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EVENT_RELEASE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(c23160024.drcon)
e4:SetTarget(c23160024.drtg)
e4:SetOperation(c23160024.drop)
c:RegisterEffect(e4)
--ritural
......@@ -44,21 +43,12 @@ end
function c23160024.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(23160024)<2 and eg:IsExists(c23160024.cfilter,1,nil,tp)
end
function c23160024.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c23160024.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,e:GetHandler():GetCode())
e:GetHandler():RegisterFlagEffect(23160024,RESET_PHASE+PHASE_END,0,1)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c23160024.ritual_filter(c)
return c:IsCode()
end
function c23160024.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......@@ -70,7 +60,8 @@ end
function c23160024.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_MZONE,0,nil,TYPE_PENDULUM)
return Duel.IsExistingMatchingCard(c23160024.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg) end
return Duel.IsExistingMatchingCard(c23160024.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c23160024.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -11,6 +11,7 @@ function c23377694.initial_effect(c)
e1:SetTarget(c23377694.atktg)
e1:SetOperation(c23377694.atkop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
......@@ -38,7 +39,7 @@ end
function c23377694.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ct=Duel.GetMatchingGroupCount(c23377694.filter2,tp,LOCATION_MZONE,0,nil)
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if ct>0 and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......@@ -47,24 +48,26 @@ function c23377694.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function c23377694.filter3(c,tp)
function c23377694.cfilter(c,tp)
return c:IsSetCard(0x9f) and c:GetPreviousControler()==tp
end
function c23377694.filter4(c,e,tp)
return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and (c:GetSequence()==6 or c:GetSequence()==7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23377694.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c23377694.filter3,1,nil,tp)
return eg:IsExists(c23377694.cfilter,1,nil,tp)
end
function c23377694.spfilter(c,e,tp)
return (c:IsSetCard(0x9f) or c:IsSetCard(0x99)) and (c:GetSequence()==6 or c:GetSequence()==7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c23377694.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c23377694.filter4,tp,LOCATION_SZONE,0,1,nil,e,tp) end
function c23377694.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c23377694.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c23377694.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c23377694.filter4,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c23377694.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c23377694.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
......@@ -61,4 +61,4 @@ end
function c24550676.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c24550676.filter,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT)
end
\ No newline at end of file
end
......@@ -34,24 +34,24 @@ function c24672164.initial_effect(c)
c:RegisterEffect(e4)
end
function c24672164.fscon(e,g,gc,chkf)
if g==nil then
return false
if g==nil then
return false
end
if gc then
if gc then
local g1=g:Filter(Card.IsFusionSetCard,nil,0x9b)
if not g1:IsContains(gc) then g1:AddCard(gc) end
local c1=g1:GetCount()
local c2=g1:FilterCount(Card.IsFusionSetCard,nil,0x109b)
return gc:IsSetCard(0x9b) and c1>=2 and c2>0
local ct1=g1:GetCount()
local ct2=g1:FilterCount(Card.IsFusionSetCard,nil,0x109b)
return gc:IsSetCard(0x9b) and ct1>=2 and ct2>0
end
local g1=g:Filter(Card.IsFusionSetCard,nil,0x9b)
local c1=g1:GetCount()
local c2=g1:FilterCount(Card.IsFusionSetCard,nil,0x109b)
if chkf~=PLAYER_NONE and not ag:IsExists(aux.FConditionCheckF,1,nil,chkf) then return false end
return c1>=2 and c2>0
local ct1=g1:GetCount()
local ct2=g1:FilterCount(Card.IsFusionSetCard,nil,0x109b)
if chkf~=PLAYER_NONE and not g1:IsExists(aux.FConditionCheckF,1,nil,chkf) then return false end
return ct1>=2 and ct2>0
end
function c24672164.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
if gc then
if gc then
local g1=eg:Filter(Card.IsFusionSetCard,nil,0x9b)
local mg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
......@@ -78,16 +78,16 @@ function c24672164.fsop(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
end
function c24672164.matcheck(e,c)
local ct=c:GetMaterialCount()
local ae=Effect.CreateEffect(c)
ae:SetType(EFFECT_TYPE_SINGLE)
ae:SetCode(EFFECT_UPDATE_ATTACK)
ae:SetValue(ct*300)
ae:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(ae)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(ct*300)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
end
function c24672164.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(c:GetSummonType(),SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
end
function c24672164.filter(c)
return c:IsSetCard(0x9b) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
......@@ -105,4 +105,4 @@ function c24672164.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
end
......@@ -47,6 +47,6 @@ end
function c32687071.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0)
end
function c32687071.limcon(e,tp,eg,ep,ev,re,r,rp)
function c32687071.limcon(e)
return Duel.IsExistingMatchingCard(c32687071.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
......@@ -45,7 +45,7 @@ end
function c34522216.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe0)
end
function c34522216.limcon(e,tp,eg,ep,ev,re,r,rp)
function c34522216.limcon(e)
return Duel.IsExistingMatchingCard(c34522216.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c34522216.limval(e,re,rp)
......@@ -65,5 +65,5 @@ function c34522216.desop(e,tp,eg,ep,ev,re,r,rp)
end
function c34522216.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA) and not c:IsSetCard(0xe0)
and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(34522216)~=0)
end
\ No newline at end of file
and (e:GetHandler():GetSummonType()==SUMMON_TYPE_PENDULUM or e:GetHandler():GetFlagEffect(34522216)~=0)
end
......@@ -27,8 +27,8 @@ function c45644898.thfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:GetLevel()==1 and c:IsAbleToHand()
end
function c45644898.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45644898.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45644898.filter,tp,LOCATION_GRAVE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45644898.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c45644898.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c45644898.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......@@ -45,23 +45,24 @@ function c45644898.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(e:GetHandler(),nil,2,REASON_COST)
end
function c45644898.gvfilter(c,e,tp)
return c:IsType(TYPE_EFFECT) and c:IsAbleToGraveAsCost()
return c:IsType(TYPE_EFFECT) and c:IsAbleToGrave()
and Duel.IsExistingMatchingCard(c45644898.spfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c45644898.spfilter(c,e,tp)
return c:IsSetCard(0xdd) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45644898.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45644898.cfilter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45644898.gvfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c45644898.gvfilter,tp,LOCATION_MZONE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
Duel.SelectTarget(tp,c45644898.gvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
local g=Duel.SelectTarget(tp,c45644898.gvfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c45644898.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e)
if tc:IsRelateToEffect(e)
and Duel.SendtoGrave(tc,REASON_EFFECT)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......@@ -70,4 +71,4 @@ function c45644898.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
end
......@@ -10,6 +10,7 @@ function c46589034.initial_effect(c)
e1:SetTarget(c46589034.sptg)
e1:SetOperation(c46589034.spop)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
......@@ -21,38 +22,39 @@ function c46589034.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsLevelAbove(1) and c:GetAttack()~=0 and c:GetDefence()~=0
end
function c46589034.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c46589034.cfilter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c46589034.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c46589034.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c46589034.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
local c=g:GetFirst()
local atk=c:GetAttack()
local def=c:GetDefence()
local val=0
if atk<=def and atk>0 then val=atk
elseif def>0 then val=def end
local tc=g:GetFirst()
local atk=tc:GetAttack()
local def=tc:GetDefence()
local val=math.min(atk,def)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,val)
end
function c46589034.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not (c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0) then return end
if not (c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e)) then return end
local atk=tc:GetAttack()
local def=tc:GetDefence()
local val=0
if atk<=def and atk>0 then val=atk
elseif def>0 then val=def end
local val=math.min(atk,def)
if Duel.Damage(tp,val,REASON_EFFECT)~=0 then
if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
if Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
else
Duel.SendtoGrave(c,REASON_RULE)
end
end
end
......
......@@ -22,8 +22,8 @@ function c47475363.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c47475363.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c47475363.filter,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(c47475363.filter,tp,0,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
\ No newline at end of file
end
......@@ -26,7 +26,7 @@ function c5067884.xfilter(c,tp)
and (c:IsReason(REASON_BATTLE) or (c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()~=tp))
end
function c5067884.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c5067884.xfilter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
if chk==0 then return eg:IsExists(c5067884.xfilter,1,e:GetHandler(),tp) and not e:GetHandler():IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(5067884,0))
end
function c5067884.repval(e,c)
......@@ -84,4 +84,4 @@ function c5067884.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
end
\ No newline at end of file
end
......@@ -59,11 +59,11 @@ function c50954680.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
if c:IsRelateToBattle() and c:IsFaceup() and bc:IsRelateToBattle() and bc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(bc:GetAttack())
c:RegisterEffect(e1)
end
end
......@@ -50,13 +50,13 @@ function c83190280.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(83190280,RESET_EVENT+0x1fe0000,0,1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
tc:RegisterFlagEffect(83190280,RESET_EVENT+0x1fe0000,0,1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_END)
......
......@@ -36,7 +36,7 @@ end
function c86157908.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local at=Duel.GetAttacker()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c86157908.filter(chkc,tp) and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(c86157908.filter,tp,LOCATION_MZONE,0,1,at,tp) end
if chk==0 then return Duel.IsExistingTarget(c86157908.filter,tp,LOCATION_MZONE,0,1,at,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c86157908.filter,tp,LOCATION_MZONE,0,1,1,at,tp)
end
......
......@@ -68,8 +68,8 @@ end
function c86221741.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
if not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
end
function c86221741.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
......@@ -85,6 +85,6 @@ function c86221741.atkop(e,tp,eg,ep,ev,re,r,rp)
sc=g:GetNext()
end
else
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
\ No newline at end of file
Duel.Damage(1-tp,1000,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