Commit f5542546 authored by argon.sun's avatar argon.sun

Merge branch 'master' of github.com:Fluorohydride/ygopro

parents 5d2bdf89 062ea05b
......@@ -13,7 +13,8 @@ function c18752938.filter(c,e,tp)
return c:IsLevelBelow(2) and c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c18752938.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c18752938.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c18752938.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c18752938.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,8 +19,7 @@ function c21924381.filter(c)
end
function c21924381.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c21924381.filter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c21924381.filter,tp,LOCATION_MZONE,0,1,Duel.GetAttackTarget()) end
if chk==0 then return Duel.IsExistingTarget(c21924381.filter,tp,LOCATION_MZONE,0,1,Duel.GetAttackTarget()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c21924381.filter,tp,LOCATION_MZONE,0,1,1,Duel.GetAttackTarget())
Duel.GetAttacker():CreateEffectRelation(e)
......
......@@ -20,7 +20,7 @@ function c25988873.filter(c,e,tp)
return c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c25988873.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c25988873.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
......@@ -69,7 +69,7 @@ function c35781051.spfilter(c,e,tp)
return c:IsSetCard(0x5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c35781051.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35781051.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
......
......@@ -27,7 +27,7 @@ end
function c35950025.ntcon(e,c)
if c==nil then return true end
return c:GetLevel()>4 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c35950025.cfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c35950025.cfilter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end
function c35950025.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_NORMAL+1
......@@ -51,9 +51,9 @@ function c35950025.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
end
......@@ -25,7 +25,7 @@ function c36870345.filter(c,e,tp)
return c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c36870345.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c36870345.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
......@@ -27,12 +27,12 @@ function c41925941.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return Duel.GetLP(tp)>100 and bc:IsAttackAbove(100) and bc:IsDefenceAbove(100) end
if chk==0 then return Duel.GetLP(tp)>100 and (bc:IsAttackAbove(100) or bc:IsDefenceAbove(100)) end
local maxc=Duel.GetLP(tp)
local atk=bc:GetAttack()
local maxpay=bc:GetAttack()
local def=bc:GetDefence()
if atk<maxc then maxc=atk end
if def<maxc then maxc=def end
if maxpay<def then maxpay=def end
if maxpay<maxc then maxc=maxpay end
if maxc>5000 then maxc=5000 end
local t={}
for i=1,maxc/100 do
......
......@@ -20,7 +20,8 @@ function c43973174.filter(c,e,tp)
return c:IsRace(RACE_DRAGON) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c43973174.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43973174.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c43973174.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c43973174.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,7 @@ function c52977572.filter(c,e,tp)
return c:IsSetCard(0x29) and c:IsRace(RACE_WINDBEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c52977572.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c52977572.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
......
......@@ -19,7 +19,7 @@ end
function c58551308.flipop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then
c:RegisterFlagEffect(58551308,RESET_EVENT+0x17a0000,0,0)
c:RegisterFlagEffect(58551308,RESET_EVENT+0x57a0000,0,0)
end
end
function c58551308.filter(c,e,tp)
......
......@@ -59,7 +59,8 @@ function c60417395.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoGrave(g1,REASON_COST)
end
function c60417395.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c60417395.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,7 +41,8 @@ function c60930169.spfilter(c,e,tp,code)
return c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c60930169.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c60930169.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c60930169.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c60930169.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -33,11 +33,14 @@ function c61344030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function c61344030.filter(c)
return c:IsFaceup() and c:GetAttack()>0
end
function c61344030.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 chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c61344030.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c61344030.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,c61344030.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c61344030.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -3,7 +3,7 @@ function c62107612.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(62107612,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_REMOVE)
e1:SetRange(LOCATION_HAND)
......@@ -14,7 +14,7 @@ function c62107612.initial_effect(c)
c:RegisterEffect(e1)
end
function c62107612.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetDescription()==aux.Stringid(93717133,0)
return bit.band(r,REASON_EFFECT)~=0 and re:GetHandler():GetCode()==93717133
end
function c62107612.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,62107612)==0 and e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -16,7 +16,7 @@ function c64187086.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c64187086.filter1(c)
return c:IsSetCard(0x21) and c:IsAbleToHand()
return c:IsSetCard(0x21) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c64187086.filter2(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToHand()
......
......@@ -44,9 +44,15 @@ function c65676461.atop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fe0000)
bc:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
Duel.ChainAttack()
if c:IsFaceup() and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
end
......@@ -19,7 +19,8 @@ function c70624184.filter(c,e,tp)
return c:IsSetCard(0x53) and c:GetCode()~=70624184 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
function c70624184.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c70624184.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function c70624184.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -34,7 +34,8 @@ function c73752131.filter(c,e,tp)
return c:IsCode(46986414) and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c73752131.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73752131.filter,tp,0x13,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c73752131.filter,tp,0x13,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,0x13)
end
function c73752131.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,12 +19,12 @@ function c74509280.target(e,syncard,f,minc)
if minc>1 then return false end
local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end
return Duel.IsExistingMatchingCard(c74509280.filter,syncard:GetControler(),LOCATION_HAND,0,1,nil,syncard,c,f,lv)
return Duel.IsExistingMatchingCard(c74509280.synfilter,syncard:GetControler(),LOCATION_HAND,0,1,nil,syncard,c,f,lv)
end
function c74509280.operation(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local g=Duel.SelectMatchingCard(tp,c74509280.filter,tp,LOCATION_HAND,0,1,1,nil,syncard,c,f,lv)
local g=Duel.SelectMatchingCard(tp,c74509280.synfilter,tp,LOCATION_HAND,0,1,1,nil,syncard,c,f,lv)
Duel.SetSynchroMaterial(g)
end
......@@ -19,7 +19,7 @@ function c76442347.initial_effect(c)
c:RegisterEffect(e2)
end
function c76442347.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(76442347,RESET_EVENT+0x17a0000,0,0)
e:GetHandler():RegisterFlagEffect(76442347,RESET_EVENT+0x57a0000,0,0)
end
function c76442347.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(76442347)~=0
......
......@@ -17,7 +17,7 @@ function c77847678.filter(c,e,tp)
return c:IsSetCard(0x3d) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c77847678.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c77847678.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
......
......@@ -31,7 +31,7 @@ function c79407975.spfilter(c)
end
function c79407975.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c79407975.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>=7
......
......@@ -52,7 +52,7 @@ function c79856792.spfilter(c)
end
function c79856792.spcon(e,c)
if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c79856792.spfilter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode)
return ct>6
......
......@@ -20,8 +20,8 @@ end
function c82324105.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and Duel.IsPlayerCanSpecialSummonMonster(tp,82324106,0,0x4011,0,0,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end
function c82324105.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>1
......
......@@ -36,8 +36,8 @@ function c83274244.atop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_CHAIN_ACTIVATING)
e1:SetOperation(c83274244.negop)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
e1:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+PHASE_DAMAGE)
e:GetHandler():RegisterEffect(e1)
end
function c83274244.negop(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
......
......@@ -20,7 +20,7 @@ function c84926738.flipop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Recover(tp,3000,REASON_EFFECT)
if c:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) then
c:RegisterFlagEffect(84926738,RESET_EVENT+0x17a0000,0,0)
c:RegisterFlagEffect(84926738,RESET_EVENT+0x57a0000,0,0)
end
end
function c84926738.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -56,7 +56,8 @@ function c88989706.filter(c,e,tp)
return c:IsCode(39711336) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c88989706.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c88989706.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c88989706.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK+LOCATION_HAND)
end
function c88989706.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,8 @@ function c91422370.filter2(c,atk,e,tp)
return c:IsSetCard(0x58) and c:GetAttack()==atk and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c91422370.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c91422370.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c91422370.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c91422370.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -17,7 +17,8 @@ end
function c9236985.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local lp=Duel.GetLP(tp)
return Duel.IsExistingMatchingCard(c9236985.filter,tp,LOCATION_HAND,0,1,nil,e,tp,lp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9236985.filter,tp,LOCATION_HAND,0,1,nil,e,tp,lp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
......
......@@ -19,7 +19,8 @@ function c93882364.filter(c,e,tp)
return c:IsSetCard(0x2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c93882364.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c93882364.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c93882364.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c93882364.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -19,7 +19,8 @@ function c96553688.filter(c,e,tp)
return c:IsCode(23558733) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c96553688.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c96553688.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c96553688.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c96553688.operation(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -26,7 +26,7 @@ function c96965364.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c96965364.cfilter,1,nil,e,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,c96965364.cfilter,1,nil,e,tp)
end
local rg=Duel.SelectReleaseGroup(tp,c96965364.cfilter,1,1,nil,e,tp)
e:SetLabel(rg:GetFirst():GetLevel())
......
......@@ -42,7 +42,8 @@ function c97151365.filter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c97151365.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97151365.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler():GetCounter(0x1e)) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c97151365.filter,tp,LOCATION_HAND,0,1,nil,e,tp,e:GetHandler():GetCounter(0x1e)) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c97151365.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -16,5 +16,5 @@ end
function c9718968.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c9718968.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(c9718968.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
......@@ -27,8 +27,10 @@ function c97617181.initial_effect(c)
c:RegisterEffect(e4)
--leave
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e5:SetDescription(aux.Stringid(97617181,0))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetCondition(c97617181.atkcon)
e5:SetOperation(c97617181.atkop)
c:RegisterEffect(e5)
end
......@@ -68,10 +70,19 @@ function c97617181.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function c97617181.atkop(e,tp,eg,ep,ev,re,r,rp)
function c97617181.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
if tc and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
e:SetLabelObject(tc)
tc:CreateEffectRelation(e)
return true
else return false end
end
function c97617181.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
......@@ -85,7 +96,7 @@ function c97617181.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=c:GetEquipTarget()
local ph=Duel.GetCurrentPhase()
if chk==0 then return (ph>PHASE_MAIN1 and ph<PHASE_MAIN2) and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectYesNo(tp,aux.Stringid(97617181,0))
return Duel.SelectYesNo(tp,aux.Stringid(97617181,1))
end
function c97617181.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
......
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