Commit 5a64bbae authored by mercury233's avatar mercury233

format: space

parent 8b7791e8
......@@ -39,7 +39,7 @@ function c14017402.splimit(e,se,sp,st)
return true
end
function c14017402.refcon(e,re,val,r,rp,rc)
return bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandler():GetControler() and e:GetHandler():IsAttackPos()
return bit.band(r,REASON_EFFECT)~=0 and rp==1-e:GetHandler():GetControler() and e:GetHandler():IsAttackPos()
end
function c14017402.ffilter(c)
return c:IsRace(RACE_DRAGON) and c:IsFusionType(TYPE_SYNCHRO)
......
......@@ -55,7 +55,7 @@ function c14577226.spfilter(c,e,tp,lv)
return c:IsLevelBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c14577226.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c14577226.tgfilter(chkc,e,tp) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c14577226.tgfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c14577226.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
......@@ -96,11 +96,11 @@ function c22398665.RitualCheck(g,tp,c,atk,greater_or_equal)
end
function c22398665.RitualCheckAdditional(c,atk,greater_or_equal)
if greater_or_equal=="Equal" then
return function(g)
return function(g)
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g)) and g:GetSum(Card.GetAttack)<=atk
end
else
return function(g,ec)
return function(g,ec)
if atk==0 then return #g<=1 end
if ec then
return (not Auxiliary.RGCheckAdditional or Auxiliary.RGCheckAdditional(g,ec)) and g:GetSum(Card.GetAttack)-Card.GetAttack(ec)<=atk
......
......@@ -74,7 +74,7 @@ end
function c25586143.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=e:GetLabelObject()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and not tc:IsImmuneToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(1-tp) and not tc:IsImmuneToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -54,7 +54,7 @@ function c29415459.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c29415459.filter(c,g)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and g:IsContains(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and g:IsContains(c)
end
function c29415459.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local cg=e:GetHandler():GetColumnGroup()
......
......@@ -15,7 +15,7 @@ function c38492752.initial_effect(c)
c:RegisterEffect(e2)
end
function c38492752.filter(c,e,tp)
return c:IsSetCard(0x39) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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,e,tp) end
......
......@@ -72,7 +72,7 @@ function c43366227.desfilter(c)
return c:IsFaceup()
end
function c43366227.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43366227.desfilter(chkc) end
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c43366227.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c43366227.desfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c43366227.desfilter,tp,0,LOCATION_MZONE,1,1,nil)
......
......@@ -49,7 +49,7 @@ function c43748308.cfilter(c)
end
function c43748308.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c43748308.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -6,7 +6,7 @@ function c47942531.initial_effect(c)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c47942531.valcheck)
c:RegisterEffect(e1)
--give atk effect only when summon
--give atk effect only when summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
......
......@@ -131,7 +131,7 @@ function c50907446.FShaddollSpFilter2(c,fc,tp,mc,chkf)
and (chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(tp,tp,sg,fc)>0)
end
function c50907446.FShaddollCondition()
return function(e,g,gc,chkf)
return function(e,g,gc,chkf)
if g==nil then return aux.MustMaterialCheck(nil,e:GetHandlerPlayer(),EFFECT_MUST_BE_FMATERIAL) end
local c=e:GetHandler()
local mg=g:Filter(c50907446.FShaddollFilter,nil,c)
......@@ -149,7 +149,7 @@ function c50907446.FShaddollCondition()
end
end
function c50907446.FShaddollOperation()
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
return function(e,tp,eg,ep,ev,re,r,rp,gc,chkf)
local c=e:GetHandler()
local mg=eg:Filter(c50907446.FShaddollFilter,nil,c)
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
......
......@@ -55,7 +55,7 @@ function c52711246.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(t2)
Duel.Destroy(t2,REASON_EFFECT)
end
if b3 and #g3>0 and Duel.SelectYesNo(tp,aux.Stringid(52711246,3)) then
if b3 and #g3>0 and Duel.SelectYesNo(tp,aux.Stringid(52711246,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local t3=g3:Select(tp,1,1,nil)
......
......@@ -80,7 +80,7 @@ function c55742055.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c55742055.filter2(c,e,tp)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x107a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c55742055.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -16,8 +16,8 @@ function c58827995.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() and c:IsLevelAbove(1) and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
end
function c58827995.fselect(g,tp)
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,4) and aux.mzctcheck(g,tp)
Duel.SetSelectedCard(g)
return g:CheckWithSumGreater(Card.GetLevel,4) and aux.mzctcheck(g,tp)
end
function c58827995.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_MZONE+LOCATION_HAND,0)
......
......@@ -19,7 +19,7 @@ function c61802346.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c61802346.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
......
......@@ -77,7 +77,7 @@ end
function c62201847.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
e:SetLabel(0)
return true
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
......@@ -55,7 +55,7 @@ function c63175639.spfilter(c,e,tp)
and c:IsLevelAbove(5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63175639.sptg(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)>-1
and Duel.IsExistingMatchingCard(c63175639.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
......
......@@ -80,12 +80,12 @@ function c63519819.equip_monster(c,tp,tc)
tc:RegisterEffect(e1)
--substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c63519819.repval)
tc:RegisterEffect(e2)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c63519819.repval)
tc:RegisterEffect(e2)
end
function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -73,12 +73,12 @@ function c64631466.equip_monster(c,tp,tc)
tc:RegisterEffect(e1)
--substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c64631466.repval)
tc:RegisterEffect(e2)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(c64631466.repval)
tc:RegisterEffect(e2)
end
function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -16,7 +16,7 @@ function c72204747.filter1(c,e,sp)
and Duel.IsExistingMatchingCard(c72204747.filter2,sp,LOCATION_DECK,0,1,nil,lv,e,sp)
end
function c72204747.filter2(c,lv,e,sp)
return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
end
function c72204747.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c72204747.filter1(chkc,e,tp) end
......
......@@ -54,7 +54,7 @@ function c75132317.cfilter(c)
end
function c75132317.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
or Duel.IsPlayerAffectedByEffect(tp,46241344) end
if Duel.IsExistingMatchingCard(c75132317.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
and (not Duel.IsPlayerAffectedByEffect(tp,46241344) or not Duel.SelectYesNo(tp,aux.Stringid(46241344,0))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -11,7 +11,7 @@ end
function c75292259.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle()
return c==Duel.GetAttacker() and bc and bc:IsRelateToBattle()
and bc:GetBattlePosition()==POS_FACEUP_ATTACK and c:IsChainAttackable(3)
end
function c75292259.atop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -48,7 +48,7 @@ function c75574498.spfilter1(c,e,tp)
return c:IsCode(81587028) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c75574498.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75574498.spfilter1(chkc,e,tp) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c75574498.spfilter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c75574498.spfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -59,7 +59,7 @@ end
function c78876707.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_XMATERIAL)
and Duel.IsExistingMatchingCard(c78876707.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
and e:GetHandler():IsCanOverlay() end
and e:GetHandler():IsCanOverlay() end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,tp,0)
end
......
......@@ -28,7 +28,7 @@ end
function c79094383.mattg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c79094383.matfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c79094383.matfilter,tp,LOCATION_MZONE,0,1,nil)
and e:GetHandler():IsCanOverlay() end
and e:GetHandler():IsCanOverlay() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c79094383.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if e:GetHandler():IsLocation(LOCATION_GRAVE) then
......
......@@ -77,7 +77,7 @@ end
function c8200556.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
e:SetLabel(0)
return true
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
......
......@@ -6,7 +6,7 @@ function c8794435.initial_effect(c)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c8794435.valcheck)
c:RegisterEffect(e1)
--give atk effect only when summon
--give atk effect only when summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_COST)
......
......@@ -26,7 +26,7 @@ function c88071625.initial_effect(c)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c88071625.valcheck)
c:RegisterEffect(e4)
--give atk effect only when summon
--give atk effect only when summon
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SUMMON_COST)
......
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