Commit 6402fb48 authored by VanillaSalt's avatar VanillaSalt

fix script

parent 95c88fd8
......@@ -952,7 +952,24 @@ bool ClientField::CheckSelectSum() {
for(sit = selable.begin(); sit != selable.end(); ++sit) {
op1 = (*sit)->opParam & 0xffff;
op2 = (*sit)->opParam >> 16;
m = (op2 > 0 && op1 > op2) ? op2 : op1;
m = op1;
sums = sumc;
sums += m;
ms = mm;
if (ms == -1 || m < ms)
ms = m;
if (sums >= select_sumval) {
if (sums - ms < select_sumval)
selectsum_cards.insert(*sit);
} else {
std::set<ClientCard*> left(selable);
left.erase(*sit);
if (check_min(left, left.begin(), select_sumval - sums, select_sumval - sums + ms - 1))
selectsum_cards.insert(*sit);
}
if (op2 == 0)
continue;
m = op2;
sums = sumc;
sums += m;
ms = mm;
......@@ -961,8 +978,6 @@ bool ClientField::CheckSelectSum() {
if (sums >= select_sumval) {
if (sums - ms < select_sumval)
selectsum_cards.insert(*sit);
else
continue;
} else {
std::set<ClientCard*> left(selable);
left.erase(*sit);
......
......@@ -103,7 +103,7 @@ end
function c10000010.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -103,7 +103,7 @@ end
function c10000011.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -32,7 +32,7 @@ function c11047543.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,c11047543.filter2,tp,LOCATION_REMOVED,0,1,1,nil,e,tp,g1:GetFirst():GetLevel())
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c11047543.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -78,7 +78,7 @@ function c11502550.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -27,7 +27,7 @@ function c12470447.activate(e,tp,eg,ep,ev,re,r,rp)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_ST_AVAILABLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -11,9 +11,6 @@ function c13438207.initial_effect(c)
e1:SetOperation(c13438207.activate)
c:RegisterEffect(e1)
end
function c13438207.filter(c,p)
return c:GetControler()==p and c:IsOnField()
end
function c13438207.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local bc=tc:GetBattleTarget()
......
......@@ -9,10 +9,7 @@ function c13532663.initial_effect(c)
e1:SetOperation(c13532663.operation)
c:RegisterEffect(e1)
end
function c13532663.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c13532663.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function c13532663.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_CONTROL,nil,0,0,0)
end
......
......@@ -36,9 +36,6 @@ function c13959634.spcon(e,c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.GetMatchingGroupCount(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_WATER)==5
end
function c13959634.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c13959634.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,13959634)==0 end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,1-tp,2)
......
......@@ -17,7 +17,7 @@ function c1571945.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c1571945.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c1571945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
local g=Duel.SelectTarget(tp,c1571945.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c1571945.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,7 +16,7 @@ end
function c15866454.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c15866454.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15866454.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c15866454.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -86,7 +86,7 @@ function c17032740.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......@@ -126,9 +126,6 @@ function c17032740.cointg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COIN,nil,0,tp,3)
end
function c17032740.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c17032740.coinop(e,tp,eg,ep,ev,re,r,rp)
local c1,c2,c3=Duel.TossCoin(tp,3)
if c1+c2+c3==3 then
......
......@@ -24,11 +24,11 @@ end
function c176392.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c176392.rfilter(c,rc)
return c~=rc and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x1d)
function c176392.rfilter(c)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsSetCard(0x1d)
end
function c176392.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c176392.rfilter,1,nil,e:GetHandler()) end
if chk==0 then return eg:IsExists(c176392.rfilter,1,e:GetHandler()) end
if Duel.SelectYesNo(tp,aux.Stringid(176392,0)) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
return true
......
......@@ -15,9 +15,6 @@ function c1804528.descon(e,tp,eg,ep,ev,re,r,rp)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
and e:GetHandler():IsPreviousPosition(POS_FACEDOWN)
end
function c1804528.desfilter(c)
return c:IsFaceup() and c:IsDestructable()
end
function c1804528.desop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
local g2=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
......
......@@ -71,7 +71,7 @@ end
function c18096222.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18096222.dafilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c18096222.daop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,7 +23,7 @@ function c20638610.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c20638610.rmfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c20638610.spfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c20638610.rmfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c20638610.rmfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
......
......@@ -19,7 +19,7 @@ end
function c20721759.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetFirst():GetBaseAttack())
......
......@@ -32,6 +32,7 @@ function c21143940.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c21143940.tfilter,tp,LOCATION_EXTRA,0,1,1,nil,tc:GetAttribute(),e,tp)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
sg:GetFirst():CompleteProcedure()
end
......
......@@ -57,7 +57,7 @@ end
function c22147147.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c22147147.desfilter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c22147147.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -21,7 +21,7 @@ function c23401839.tg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c23401839.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c23401839.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
......@@ -33,7 +33,7 @@ end
function c25231813.eqlimit(e,c)
return c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
end
function c25231813.filter(c,tp)
function c25231813.filter(c)
return c:IsFaceup() and c:IsLevelAbove(8) and c:IsRace(RACE_DRAGON) and c:IsType(TYPE_SYNCHRO)
end
function c25231813.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -14,12 +14,12 @@ function c27004302.filter(c)
return c:IsSetCard(0x1047) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c27004302.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27004302.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c27004302.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function c27004302.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c27004302.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c27004302.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -11,7 +11,7 @@ function c27178262.initial_effect(c)
e1:SetOperation(c27178262.activate)
c:RegisterEffect(e1)
end
function c27178262.costfilter(c,e,tp)
function c27178262.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3d) and c:IsAbleToGraveAsCost()
end
function c27178262.cost(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -24,11 +24,11 @@ function c27178262.filter(c,e,tp)
return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c27178262.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c27178262.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c27178262.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c27178262.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
and Duel.IsExistingTarget(c27178262.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c27178262.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local g=Duel.SelectTarget(tp,c27178262.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c27178262.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -23,7 +23,7 @@ end
function c28429121.mfilter1(c,e)
return c:IsFaceup() and c:GetLevel()>0 and not c:IsImmuneToEffect(e) and c:IsReleasable()
end
function c28429121.mfilter2(c,e)
function c28429121.mfilter2(c)
return c:IsHasEffect(EFFECT_EXTRA_RITUAL_MATERIAL) and c:IsAbleToRemove()
end
function c28429121.get_material(e,tp)
......
......@@ -9,7 +9,7 @@ function c28643791.initial_effect(c)
e1:SetOperation(c28643791.operation)
c:RegisterEffect(e1)
end
function c28643791.filter(c,tp)
function c28643791.filter(c)
return c:IsFaceup() and c:IsSetCard(0x4b)
end
function c28643791.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -81,7 +81,7 @@ function c28677304.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -15,11 +15,11 @@ function c30461781.filter(c)
end
function c30461781.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local d = 1
local d=1
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1
and Duel.IsExistingMatchingCard(c30461781.filter,tp,0,LOCATION_MZONE,1,nil,TYPE_SPIRIT)
and Duel.SelectOption(tp,aux.Stringid(30461781,0),aux.Stringid(30461781,1)) == 1 then
d = 2
and Duel.IsExistingMatchingCard(c30461781.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.SelectOption(tp,aux.Stringid(30461781,0),aux.Stringid(30461781,1))==1 then
d=2
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(d)
......
......@@ -30,13 +30,13 @@ function c31975743.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c31975743.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c31975743.cfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
Duel.SendtoGrave(g,REASON_COST)
end
function c31975743.filter(c)
return c:IsPosition(POS_FACEUP_DEFENCE) and c:IsControlerCanBeChanged()
end
function c31975743.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31975743.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c31975743.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31975743.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c31975743.filter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -14,7 +14,7 @@ function c32298781.filter(c)
return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetLevel()==1
end
function c32298781.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c32298781.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c32298781.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c32298781.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c32298781.filter,tp,LOCATION_MZONE,0,nil)
......
......@@ -23,7 +23,7 @@ function c32854013.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g2,1,0,0)
end
function c32854013.activate(e)
......
......@@ -23,9 +23,6 @@ function c34796454.regop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c34796454.filter(c)
return c:IsSetCard(0x100d) and c:IsAbleToHand()
end
function c34796454.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
......@@ -15,8 +15,8 @@ function c35027493.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackAbove(2000)
end
function c35027493.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c35027493.costfilter,1,nil,ATTRIBUTE_DARK) end
local g=Duel.SelectReleaseGroup(tp,c35027493.costfilter,1,1,nil,ATTRIBUTE_DARK)
if chk==0 then return Duel.CheckReleaseGroup(tp,c35027493.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c35027493.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c35027493.tgfilter(c)
......
......@@ -21,7 +21,7 @@ end
function c35429292.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c35429292.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(1-tp,c35429292.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
......
......@@ -15,7 +15,7 @@ function c36643046.filter(c,e,tp)
return c:IsSetCard(0x17) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36643046.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and c36643046.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c36643046.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c36643046.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -18,7 +18,7 @@ function c38492752.filter(c,e,tp)
return c:IsSetCard(0x39) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c38492752.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c38492752.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c38492752.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c38492752.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -24,7 +24,7 @@ function c39695323.filter(c,e,tp)
return c:IsSetCard(0x59) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c39695323.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39695323.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c39695323.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c39695323.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -23,7 +23,7 @@ function c40253382.filter(c,e,tp)
return c:IsSetCard(0x27) and c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40253382.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40253382.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c40253382.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c40253382.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -29,7 +29,7 @@ end
function c42280216.shcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and e:GetHandler():IsReason(REASON_DESTROY)
end
function c42280216.filter(c,e,tp)
function c42280216.filter(c)
local code=c:GetCode()
return (code==78275321 or code==78552773) and c:IsAbleToHand()
end
......
......@@ -15,7 +15,7 @@ function c43641473.tcfilter(tc,ec)
return tc:IsFaceup() and ec:CheckEquipTarget(tc)
end
function c43641473.ecfilter(c)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()~=nil and Duel.IsExistingTarget(c43641473.tcfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
return c:IsType(TYPE_EQUIP) and c:GetEquipTarget()~=nil and Duel.IsExistingTarget(c43641473.tcfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c:GetEquipTarget(),c)
end
function c43641473.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c43641473.ecfilter(chkc) end
......
......@@ -14,7 +14,7 @@ function c44072894.filter(c,e)
return c:IsReason(REASON_FUSION) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c:IsCanBeEffectTarget(e)
end
function c44072894.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44072894.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44072894.filter(chkc,e) end
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c44072894.filter,tp,LOCATION_GRAVE,0,nil,e)
if g:GetCount()>=2 then
......
......@@ -15,7 +15,7 @@ function c44341034.filter(c,e,tp)
return c:GetLevel()==3 and c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c44341034.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and c44341034.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c44341034.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c44341034.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -79,9 +79,9 @@ function c44505297.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g1=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_ONFIELD,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g1,2,0,0)
......
......@@ -15,7 +15,7 @@ function c45045866.initial_effect(c)
e2:SetOperation(c45045866.operation)
c:RegisterEffect(e2)
end
function c45045866.filter(c,e,tp)
function c45045866.filter(c)
local code=c:GetCode()
return (code==81434470 or code==18828179) and c:IsAbleToHand()
end
......
......@@ -43,7 +43,7 @@ function c45452224.filter(c,e,tp)
return c:GetLevel()==1 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c45452224.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c45452224.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c45452224.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c45452224.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c45452224.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -10,9 +10,6 @@ function c45898858.initial_effect(c)
e1:SetOperation(c45898858.activate)
c:RegisterEffect(e1)
end
function c45898858.costfilter(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
end
function c45898858.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsCode,2,nil,22587018)
and Duel.CheckReleaseGroup(tp,Card.IsCode,1,nil,58071123) end
......
......@@ -47,9 +47,9 @@ end
function c4694209.addct2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x21,1,REASON_EFFECT)
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,e:GetHandler(),0x21,1) end
and Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(98162021,1))
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler(),0x21,1)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
end
function c4694209.addc2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -31,7 +31,7 @@ end
function c47150851.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(rp,LOCATION_MZONE)>0
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==1
and Duel.IsExistingMatchingCard(c47150851.cfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
......@@ -16,7 +16,7 @@ function c473469.filter(c,tp)
and bit.band(c:GetReason(),0x41)==0x41
end
function c473469.condition(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and eg:IsExists(c473469.filter,1,nil,tp,rp)
return rp~=tp and eg:IsExists(c473469.filter,1,nil,tp)
end
function c473469.desfilter(c)
return c:IsDestructable() and c:IsType(TYPE_SPELL+TYPE_TRAP)
......
......@@ -87,9 +87,6 @@ function c48568432.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end
end
function c48568432.sfilter(c)
return c:IsSetCard(0x36) and c:GetCode()~=42940404 and c:IsAbleToHand()
end
function c48568432.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsStatus(STATUS_UNION) and eg:GetFirst()==e:GetHandler():GetEquipTarget()
end
......
......@@ -22,7 +22,7 @@ function c48588176.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c48588176.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c48588176.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
......@@ -14,7 +14,7 @@ function c48659020.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c48659020.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48659020.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c48659020.filter(chkc,e,tp) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c48659020.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
......@@ -81,7 +81,7 @@ function c48996569.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -9,7 +9,7 @@ function c49251811.initial_effect(c)
c:RegisterEffect(e1)
end
function c49251811.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasTyp(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_CONTINUOUS+TYPE_SPELL
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetActiveType()==TYPE_CONTINUOUS+TYPE_SPELL
end
function c49251811.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -94,7 +94,7 @@ function c49352945.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,3 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -17,7 +17,7 @@ function c49600724.filter1(c,g)
return g:IsExists(Card.IsAttribute,1,c,c:GetAttribute())
end
function c49600724.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c49600724.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c49600724.filter(chkc,e) end
if chk==0 then
local g=Duel.GetMatchingGroup(c49600724.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil,e)
return g:IsExists(c49600724.filter1,1,nil,g)
......
......@@ -36,7 +36,7 @@ function c49681811.initial_effect(c)
c:RegisterEffect(e4)
end
function c49681811.distg(e,c)
if c:GetCardTargetCount()==0 then return false end
if not c:IsType(TYPE_SPELL) or c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsContains(e:GetHandler())
end
function c49681811.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -31,10 +31,10 @@ function c50278554.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil,e)
local g1=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,1,0,0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil,e)
local g2=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g2,2,0,0)
end
function c50278554.desop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -14,7 +14,7 @@ end
function c50957346.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c50957346.filter(c,e,tp)
function c50957346.filter(c)
return (c:IsFacedown() or c:IsAttribute(0xff-ATTRIBUTE_EARTH)) and c:IsDestructable()
end
function c50957346.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -45,9 +45,6 @@ function c51085303.adop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e2)
end
end
function c51085303.filter(c)
return c:IsFaceup() and c:IsSetCard(0x3008)
end
function c51085303.attg(e,c)
return c:IsFacedown() or not c:IsCode(51085303)
end
......@@ -59,7 +59,7 @@ function c5126490.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -84,9 +84,6 @@ function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
end
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function c5128859.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c5128859.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
......
......@@ -15,7 +15,7 @@ function c52346240.filter(c,e,tp)
return c:GetLevel()==1 and c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c52346240.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52346240.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c52346240.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c52346240.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -34,8 +34,8 @@ end
function c5494820.filter(c)
return c:IsFaceup() and c:IsCode(10992251)
end
function c5494820.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsCode(10992251) end
function c5494820.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c5494820.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c5494820.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c5494820.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -15,8 +15,8 @@ function c54974237.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:GetAttack()>=2500
end
function c54974237.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c54974237.costfilter,1,nil,ATTRIBUTE_DARK) end
local g=Duel.SelectReleaseGroup(tp,c54974237.costfilter,1,1,nil,ATTRIBUTE_DARK)
if chk==0 then return Duel.CheckReleaseGroup(tp,c54974237.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c54974237.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c54974237.tgfilter(c,ty)
......
......@@ -15,7 +15,7 @@ function c55013285.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c55013285.filter(c,e,tp)
return c:IsCode(55013285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENCE)
return c:IsCode(55013285) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c55013285.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -36,11 +36,11 @@ end
function c55046718.eqlimit(e,c)
return c:IsSetCard(0x30)
end
function c55046718.filter(c,tp)
function c55046718.filter(c)
return c:IsFaceup() and c:IsSetCard(0x30)
end
function c55046718.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c55046718.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55046718.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c55046718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c55046718.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -37,11 +37,11 @@ end
function c55154048.eqlimit(e,c)
return c:IsSetCard(0x42) or c:IsSetCard(0x4b)
end
function c55154048.filter(c,tp)
function c55154048.filter(c)
return c:IsFaceup() and (c:IsSetCard(0x42) or c:IsSetCard(0x4b))
end
function c55154048.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c55154048.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55154048.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c55154048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c55154048.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -82,7 +82,7 @@ function c55171412.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......@@ -116,9 +116,6 @@ function c55171412.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c55171412.filter(c)
return c:IsFacedown() and c:IsDestructable()
end
function c55171412.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_HAND)
......
......@@ -25,9 +25,6 @@ function c55428811.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,dc)
end
function c55428811.tgfilter(c,e)
return not c:IsRelateToEffect(e)
end
function c55428811.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
......
......@@ -29,7 +29,7 @@ function c5556499.initial_effect(c)
c:RegisterEffect(e3)
end
function c5556499.spfilter(c,ec)
return c:IsRace(RACE_MACHINE) and (c~=ec or c:IsAbleToGraveAsCost())
return c:IsRace(RACE_MACHINE) and (c~=ec or c:IsDiscardable())
end
function c5556499.spcon(e,c)
if c==nil then return true end
......@@ -40,7 +40,7 @@ function c5556499.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetMatchingGroup(c5556499.spfilter,c:GetControler(),LOCATION_HAND,0,nil,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=g:SelectWithSumGreater(tp,Card.GetLevel,8)
Duel.SendtoGrave(sg,REASON_COST)
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
function c5556499.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
......
......@@ -38,12 +38,6 @@ function c55737443.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x5c)
Duel.Release(g,REASON_COST)
end
function c55737443.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c55737443.value(e,c)
return Duel.GetMatchingGroupCount(c55737443.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*200
end
function c55737443.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return tc~=e:GetHandler() and tc:IsAttribute(ATTRIBUTE_EARTH)
......
......@@ -37,7 +37,7 @@ end
function c56387350.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local tc=Duel.SelectMatchingCard(tp,c56387350.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp,e:GetHandler(),Duel.GetTurnCount())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,c56387350.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,ft,nil,e,tp,e:GetHandler(),Duel.GetTurnCount())
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
......@@ -17,7 +17,7 @@ function c56605802.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c56605802.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c56605802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
local g=Duel.SelectTarget(tp,c56605802.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c56605802.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -14,7 +14,7 @@ function c5703682.filter(c)
return c:IsFaceup() and bit.band(tpe,TYPE_NORMAL)~=0 and bit.band(tpe,TYPE_TOKEN)==0 and c:GetLevel()==2
end
function c5703682.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c5703682.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
if chk==0 then return Duel.IsExistingMatchingCard(c5703682.filter,tp,LOCATION_MZONE,0,1,nil) end
end
function c5703682.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c5703682.filter,tp,LOCATION_MZONE,0,nil)
......
......@@ -11,14 +11,14 @@ function c57238939.initial_effect(c)
e1:SetOperation(c57238939.cosop)
c:RegisterEffect(e1)
end
function c57238939.filter(c,att)
function c57238939.filter(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c57238939.costg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c57238939.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57238939.filter,tp,LOCATION_MZONE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c57238939.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c57238939.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c57238939.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c57238939.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c57238939.cosop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -15,8 +15,8 @@ function c57728570.costfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAttackBelow(1000)
end
function c57728570.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c57728570.costfilter,1,nil,ATTRIBUTE_DARK) end
local g=Duel.SelectReleaseGroup(tp,c57728570.costfilter,1,1,nil,ATTRIBUTE_DARK)
if chk==0 then return Duel.CheckReleaseGroup(tp,c57728570.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c57728570.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c57728570.tgfilter(c)
......
......@@ -85,7 +85,7 @@ end
function c5861892.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -17,7 +17,7 @@ end
function c58628539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
......
......@@ -14,7 +14,7 @@ end
function c59235795.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function c59235795.filter(c,e,tp)
function c59235795.filter(c)
return (c:IsFacedown() or c:IsAttribute(0xff-ATTRIBUTE_WIND)) and c:IsDestructable()
end
function c59235795.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -42,7 +42,7 @@ end
function c59385322.eqlimit(e,c)
return c:IsSetCard(0x1d)
end
function c59385322.filter(c,tp)
function c59385322.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1d)
end
function c59385322.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -39,9 +39,6 @@ function c6133894.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),c6133894.rfilter,1,1,nil,66073051)
Duel.Release(g,REASON_COST)
end
function c6133894.cfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c6133894.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
......
......@@ -14,7 +14,7 @@ function c61831093.filter(c,e)
return c:IsFacedown() and c:IsDestructable() and c:IsCanBeEffectTarget(e)
end
function c61831093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_SZONE and c61831093.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c61831093.filter(chkc,e) end
if chk==0 then return true end
local g=Duel.GetMatchingGroup(c61831093.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil,e)
if g:GetCount()<2 then
......
......@@ -22,7 +22,7 @@ function c62379337.filter(c)
return c:IsDefenceBelow(1500) and c:IsRace(RACE_PLANT) and c:IsAbleToHand()
end
function c62379337.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c62379337.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
......@@ -19,7 +19,7 @@ function c6256844.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c6256844.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c6256844.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
......
......@@ -23,7 +23,7 @@ function c63223467.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c63223467.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c63223467.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,c63223467.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
......
......@@ -32,7 +32,7 @@ end
function c63851864.eqlimit(e,c)
return c:IsRace(RACE_MACHINE)
end
function c63851864.filter(c,tp)
function c63851864.filter(c)
return c:IsFaceup() and c:IsRace(RACE_MACHINE)
end
function c63851864.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -15,7 +15,7 @@ function c63977008.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63977008.sumtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63977008.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c63977008.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c63977008.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -17,7 +17,7 @@ function c63995093.filter2(c,code,e,tp)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63995093.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63995093.filter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63995093.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c63995093.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(63995093,0))
......@@ -28,8 +28,7 @@ function c63995093.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if ft>2 then ft=2 end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c63995093.filter2,tp,LOCATION_DECK,0,1,ft,nil,tc:GetCode(),e,tp)
......
......@@ -35,8 +35,8 @@ end
function c64389297.filter(c)
return c:IsFaceup() and c:IsCode(67284908)
end
function c64389297.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() and chkc:IsCode(67284908) end
function c64389297.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c64389297.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c64389297.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c64389297.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -47,7 +47,7 @@ end
function c65079854.eqlimit(e,c)
return c:IsCode(73580471) or c:IsRace(RACE_PLANT)
end
function c65079854.filter(c,tp)
function c65079854.filter(c)
return c:IsFaceup() and (c:IsCode(73580471) or c:IsRace(RACE_PLANT))
end
function c65079854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -16,7 +16,7 @@ function c652362.filter(c,e,tp)
return lv>0 and lv<=4 and c:IsSetCard(0xc) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c652362.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c652362.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c652362.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c652362.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -23,7 +23,7 @@ function c66214679.filter(c,e,tp)
return c:GetLevel()==4 and c:IsAttribute(ATTRIBUTE_DARK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c66214679.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66214679.filter(chkc) end
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c66214679.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsRelateToEffect(e)
and e:GetHandler():IsFaceup() and Duel.IsExistingTarget(c66214679.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -22,9 +22,6 @@ function c67169062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c67169062.tgfilter(c,e)
return not c:IsRelateToEffect(e)
end
function c67169062.activate(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=5 then return end
......
......@@ -14,9 +14,6 @@ function c68057622.initial_effect(c)
e2:SetOperation(c68057622.desop)
c:RegisterEffect(e2)
end
function c68057622.filter(c)
return c:IsCode(68057622) and c:IsAbleToHand()
end
function c68057622.descon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
......
......@@ -25,7 +25,7 @@ function c68124775.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c68124775.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c68124775.filter,tp,0,LOCATION_MZONE,1,1,nil,tp)
local g=Duel.SelectTarget(tp,c68124775.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function c68124775.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,7 +37,7 @@ end
function c68597372.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c68597372.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c68597372.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c68597372.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
......
......@@ -13,10 +13,6 @@ end
function c69270537.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x9) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
end
function c69270537.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_FUSION) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false)
and c:CheckFusionMaterial(m,nil,chkf)
end
function c69270537.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69270537.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69270537.tdfilter,tp,LOCATION_MZONE,0,1,nil) end
......
......@@ -29,7 +29,7 @@ function c69313735.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
if e:GetLabel()~=0 then
e:SetLabel(0)
local rg=Duel.SelectReleaseGroup(tp,c69313735.rfilter,1,1,c,tp)
local rg=Duel.SelectReleaseGroup(tp,c69313735.rfilter,1,1,nil,tp)
Duel.Release(rg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
......
......@@ -36,7 +36,7 @@ function c706925.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c706925.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c706925.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -51,9 +51,6 @@ function c7093411.repoperation(e,tp,eg,ep,ev,re,r,rp,chk)
c:RegisterEffect(e1)
Duel.RaiseEvent(c,47408488,e,0,tp,0,0)
end
function c7093411.filter(c)
return c:IsSetCard(0x34)
end
function c7093411.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_HAND,0,1,nil,0x34)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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