Commit 2b3e0e2d authored by Fluorohydride's avatar Fluorohydride

Merge pull request #290 from VanillaSalt/patch30

fix
parents 351bbda6 12c9432a
...@@ -51,11 +51,11 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -51,11 +51,11 @@ function c20951752.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetLabel()==1 return e:GetLabel()==1
end end
function c20951752.sumcost(e,tp,eg,ep,ev,re,r,rp,chk) function c20951752.sumcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_FAIRY) end if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.GetReleaseGroup(tp) local g=Duel.GetReleaseGroup(tp)
local rg=g:Filter(Card.IsRace,nil,RACE_FAIRY) local ct=g:FilterCount(Card.IsRace,nil,RACE_FAIRY)
Duel.Release(rg,REASON_COST) Duel.Release(g,REASON_COST)
e:GetLabelObject():SetLabel(rg:GetCount()) e:GetLabelObject():SetLabel(ct)
end end
function c20951752.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) function c20951752.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
...@@ -73,7 +73,7 @@ function c20951752.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +73,7 @@ function c20951752.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end end
function c20951752.destg(e,tp,eg,ep,ev,re,r,rp,chk) function c20951752.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) and e:GetLabel()>0 end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
......
...@@ -51,7 +51,7 @@ function c22751868.filter(c,e,tp) ...@@ -51,7 +51,7 @@ function c22751868.filter(c,e,tp)
return c:IsLevelAbove(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelAbove(4) and c:IsSetCard(0x11) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c22751868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c22751868.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) and c22751868.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c22751868.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c22751868.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c22751868.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c26708437.activate(e,tp,eg,ep,ev,re,r,rp) function c26708437.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 and c:IsRelateToEffect(e) then
c:CancelToGrave() c:CancelToGrave()
Duel.Overlay(tc,Group.FromCards(c)) Duel.Overlay(tc,Group.FromCards(c))
end end
......
...@@ -110,7 +110,7 @@ c33900648[0]=0 ...@@ -110,7 +110,7 @@ c33900648[0]=0
c33900648[1]=0 c33900648[1]=0
function c33900648.raccheck(p) function c33900648.raccheck(p)
local rac=0 local rac=0
for i=1,5 do for i=0,4 do
local tc=Duel.GetFieldCard(p,LOCATION_MZONE,i) local tc=Duel.GetFieldCard(p,LOCATION_MZONE,i)
if tc and tc:IsFaceup() then if tc and tc:IsFaceup() then
rac=bit.bor(rac,tc:GetAttribute()) rac=bit.bor(rac,tc:GetAttribute())
......
...@@ -21,13 +21,13 @@ function c52097679.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,13 +21,13 @@ function c52097679.activate(e,tp,eg,ep,ev,re,r,rp)
local def=tc:GetBaseDefence() local def=tc:GetBaseDefence()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL) e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetValue(def) e1:SetValue(def)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_DEFENCE_FINAL) e2:SetCode(EFFECT_SET_BASE_DEFENCE)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e2:SetValue(atk) e2:SetValue(atk)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
......
...@@ -16,14 +16,14 @@ function c52823314.filter(c) ...@@ -16,14 +16,14 @@ function c52823314.filter(c)
end end
function c52823314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c52823314.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c52823314.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c52823314.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c52823314.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c52823314.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil) local g=Duel.SelectTarget(tp,c52823314.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end end
function c52823314.operation(e,tp,eg,ep,ev,re,r,rp) function c52823314.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
end end
...@@ -42,7 +42,7 @@ function c61650133.rmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,7 +42,7 @@ function c61650133.rmop(e,tp,eg,ep,ev,re,r,rp)
local rm2=false local rm2=false
local tc=eg:GetFirst() local tc=eg:GetFirst()
while tc do while tc do
if tc:IsLocation(LOCATION_ONFIELD) and tc:IsFaceup() then if tc:IsOnField() then
if tc:IsControler(tp) then rm1=true else rm2=true end if tc:IsControler(tp) then rm1=true else rm2=true end
end end
tc=eg:GetNext() tc=eg:GetNext()
......
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