Commit 27501bfb authored by VanillaSalt's avatar VanillaSalt

fix

parent a88f8bca
...@@ -4,6 +4,7 @@ function c15381252.initial_effect(c) ...@@ -4,6 +4,7 @@ function c15381252.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCountLimit(1,15381252+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c15381252.condition) e1:SetCondition(c15381252.condition)
e1:SetCost(c15381252.cost) e1:SetCost(c15381252.cost)
e1:SetTarget(c15381252.target) e1:SetTarget(c15381252.target)
...@@ -22,9 +23,6 @@ function c15381252.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,9 +23,6 @@ function c15381252.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD) Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end end
function c15381252.filter(c,e,tp,dam)
return c:IsAttackBelow(dam) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c15381252.target(e,tp,eg,ep,ev,re,r,rp,chk) function c15381252.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end
end end
......
...@@ -11,11 +11,11 @@ function c15981690.initial_effect(c) ...@@ -11,11 +11,11 @@ function c15981690.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special --special
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(23893227,1)) e2:SetDescription(aux.Stringid(15981690,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,23893227) e2:SetCountLimit(1,15981690)
e2:SetCost(c15981690.spcost) e2:SetCost(c15981690.spcost)
e2:SetTarget(c15981690.sptg) e2:SetTarget(c15981690.sptg)
e2:SetOperation(c15981690.spop) e2:SetOperation(c15981690.spop)
......
...@@ -7,6 +7,7 @@ function c16114248.initial_effect(c) ...@@ -7,6 +7,7 @@ function c16114248.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_FUSION_MATERIAL) e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetCondition(c16114248.fscondition) e1:SetCondition(c16114248.fscondition)
e1:SetOperation(c16114248.fsoperation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--direct attack --direct attack
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -15,21 +16,21 @@ function c16114248.initial_effect(c) ...@@ -15,21 +16,21 @@ function c16114248.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c16114248.spfilter(c,mg) function c16114248.spfilter(c,mg)
return c:IsRace(RACE_MACHINE) and mg:IsExists(Card.IsCode,1,c,c:GetCode()) return c:IsRace(RACE_MACHINE) and mg:IsExists(c16114248.spfilter2,1,c,c:GetCode())
end end
function c16114248.spfilter1(c,code) function c16114248.spfilter2(c,code)
return c:IsRace(RACE_MACHINE) and c:IsCode(code) return c:IsRace(RACE_MACHINE) and c:IsCode(code)
end end
function c16114248.fscondition(e,mg,gc) function c16114248.fscondition(e,mg,gc)
if mg==nil then return false end if mg==nil then return false end
if gc then return false end if gc then return true end
return mg:IsExists(c16114248.spfilter,1,nil,mg) return mg:IsExists(c16114248.spfilter,1,nil,mg)
end end
function c16114248.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc) function c16114248.fsoperation(e,tp,eg,ep,ev,re,r,rp,gc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g1=eg:FilterSelect(tp,c16114248.spfilter,1,1,nil,eg) local g1=eg:FilterSelect(tp,c16114248.spfilter,1,1,nil,eg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g2=eg:FilterSelect(tp,spfilter1,1,1,g1:GetFirst(),g1:GetFirst():GetCode()) local g2=eg:FilterSelect(tp,c16114248.spfilter2,1,1,g1:GetFirst(),g1:GetFirst():GetCode())
g1:Merge(g2) g1:Merge(g2)
Duel.SetFusionMaterial(g1) Duel.SetFusionMaterial(g1)
end end
\ No newline at end of file
...@@ -13,6 +13,7 @@ function c16404809.initial_effect(c) ...@@ -13,6 +13,7 @@ function c16404809.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetCondition(c16404809.condition) e2:SetCondition(c16404809.condition)
e2:SetCost(c16404809.cost) e2:SetCost(c16404809.cost)
e2:SetTarget(c16404809.target) e2:SetTarget(c16404809.target)
...@@ -20,7 +21,7 @@ function c16404809.initial_effect(c) ...@@ -20,7 +21,7 @@ function c16404809.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c16404809.sumsuc(e,tp,eg,ep,ev,re,r,rp) function c16404809.sumsuc(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(16404809,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(16404809,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end end
function c16404809.condition(e,tp,eg,ep,ev,re,r,rp) function c16404809.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(16404809)~=0 return e:GetHandler():GetFlagEffect(16404809)~=0
...@@ -30,19 +31,19 @@ function c16404809.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,19 +31,19 @@ function c16404809.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
end end
function c16404809.target(e,tp,eg,ep,ev,re,r,rp,chk) function c16404809.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=0 end if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=5 end
end end
function c16404809.filter(c) function c16404809.filter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c16404809.operation(e,tp,eg,ep,ev,re,r,rp) function c16404809.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<5 then return end
Duel.ConfirmDecktop(tp,5) Duel.ConfirmDecktop(tp,5)
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
if g:IsExists(c16404809.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(16404809,1)) then if g:IsExists(c16404809.filter,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(16404809,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TO_HAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:FilterSelect(tp,c16404809.filter,1,1,nil) local sg=g:FilterSelect(tp,c16404809.filter,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
......
...@@ -6,15 +6,15 @@ function c17052477.initial_effect(c) ...@@ -6,15 +6,15 @@ function c17052477.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c17052477.cost) e1:SetCost(c17052477.cost)
e1:SetTarget(c17052477.drtg) e1:SetTarget(c17052477.target)
e1:SetOperation(c17052477.drop) e1:SetOperation(c17052477.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Effect Draw --Effect Draw
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT) e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
e2:SetValue(2) e2:SetValue(2)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -23,13 +23,14 @@ function c17052477.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,13 +23,14 @@ function c17052477.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,5,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD) Duel.DiscardHand(tp,Card.IsDiscardable,5,5,REASON_COST+REASON_DISCARD)
end end
function c17052477.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c17052477.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2) Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end end
function c17052477.drop(e,tp,eg,ep,ev,re,r,rp) function c17052477.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
--しゅんかんゆうごう --瞬間融合
function c17236839.initial_effect(c) function c17236839.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -17,10 +17,6 @@ function c17236839.filter2(c,e,tp,m,f,chkf) ...@@ -17,10 +17,6 @@ function c17236839.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c17236839.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c17236839.target(e,tp,eg,ep,ev,re,r,rp,chk) function c17236839.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
...@@ -38,7 +34,6 @@ function c17236839.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +34,6 @@ function c17236839.target(e,tp,eg,ep,ev,re,r,rp,chk)
return res return res
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetChainLimit(aux.FALSE)
end end
function c17236839.activate(e,tp,eg,ep,ev,re,r,rp) function c17236839.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp local chkf=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and PLAYER_NONE or tp
...@@ -65,22 +60,21 @@ function c17236839.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,22 +60,21 @@ function c17236839.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetOperation(c17236839.desop)
tc:RegisterEffect(e1,true)
tc:CompleteProcedure()
else else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf) local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation() local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2) fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() tc:CompleteProcedure()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetOperation(c17236839.desop)
tc:RegisterEffect(e1,true)
end end
end end
function c17236839.desop(e,tp,eg,ep,ev,re,r,rp) function c17236839.desop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,10 +12,9 @@ function c18175965.initial_effect(c) ...@@ -12,10 +12,9 @@ function c18175965.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_SUMMON) e2:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--
local e3=e2:Clone() local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_MSET) e3:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(18175965,0)) e4:SetDescription(aux.Stringid(18175965,0))
...@@ -34,7 +33,6 @@ function c18175965.initial_effect(c) ...@@ -34,7 +33,6 @@ function c18175965.initial_effect(c)
e5:SetCategory(CATEGORY_EQUIP) e5:SetCategory(CATEGORY_EQUIP)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS) e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCondition(c18175965.eqcon)
e5:SetTarget(c18175965.eqtg) e5:SetTarget(c18175965.eqtg)
e5:SetOperation(c18175965.eqop) e5:SetOperation(c18175965.eqop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
...@@ -46,18 +44,16 @@ function c18175965.initial_effect(c) ...@@ -46,18 +44,16 @@ function c18175965.initial_effect(c)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0) e6:SetTargetRange(1,0)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--disable spsummon
local e7=e6:Clone() local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e7:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--special summon 2 --special summon 2
local e8=Effect.CreateEffect(c) local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(18175965,2)) e8:SetDescription(aux.Stringid(18175965,2))
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCategory(CATEGORY_SPECIAL_SUMMON) e8:SetCategory(CATEGORY_SPECIAL_SUMMON)
e8:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_TO_GRAVE) e8:SetCode(EVENT_TO_GRAVE)
e8:SetCondition(c18175965.spcon1) e8:SetCondition(c18175965.spcon2)
e8:SetCost(c18175965.spcost) e8:SetCost(c18175965.spcost)
e8:SetTarget(c18175965.sptg) e8:SetTarget(c18175965.sptg)
e8:SetOperation(c18175965.spop) e8:SetOperation(c18175965.spop)
...@@ -81,9 +77,6 @@ function c18175965.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,9 +77,6 @@ function c18175965.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
end end
end end
function c18175965.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=1
end
function c18175965.filter(c,ec) function c18175965.filter(c,ec)
return c:IsCode(81954378) and c:CheckEquipTarget(ec) return c:IsCode(81954378) and c:CheckEquipTarget(ec)
end end
...@@ -95,18 +88,16 @@ end ...@@ -95,18 +88,16 @@ end
function c18175965.eqop(e,tp,eg,ep,ev,re,r,rp) function c18175965.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(18175965,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(18175965,3))
local g=Duel.SelectMatchingCard(tp,c18175965.filter,tp,LOCATION_DECK,0,1,1,nil,c) local g=Duel.SelectMatchingCard(tp,c18175965.filter,tp,LOCATION_DECK,0,1,1,nil,c)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c) Duel.Equip(tp,g:GetFirst(),c)
end end
end end
function c18175965.spcon1(e,tp,eg,ep,ev,re,r,rp) function c18175965.spcon2(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_DESTROY)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c18175965.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c18175965.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_HAND,0,1,nil) end
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0) Duel.DiscardHand(tp,Card.IsAbleToGraveAsCost,1,1,REASON_COST)
local sg=g:FilterSelect(tp,Card.IsAbleToGraveAsCost,1,1,nil) end
Duel.SendtoGrave(sg,REASON_COST)
end
\ No newline at end of file
...@@ -10,13 +10,10 @@ function c21414674.initial_effect(c) ...@@ -10,13 +10,10 @@ function c21414674.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c21414674.filter(c) function c21414674.filter(c)
return c:IsFaceup() and ( return c:IsFaceup() and (c:IsCode(22530212) or c:IsCode(68535320) or c:IsCode(95929069))
c:GetCode()==22530212 or
c:GetCode()==68535320 or
c:GetCode()==95929069)
end end
function c21414674.spcon(e,c) function c21414674.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
Duel.IsExistingMatchingCard(c21414674.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c21414674.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
end end
...@@ -2,9 +2,10 @@ ...@@ -2,9 +2,10 @@
function c22530212.initial_effect(c) function c22530212.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(c22530212.condition) e1:SetCondition(c22530212.condition)
...@@ -20,16 +21,16 @@ function c22530212.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,16 +21,16 @@ function c22530212.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c22530212.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22530212.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=eg:Filter(c22530212.cfilter,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end end
function c22530212.filter(c,e,tp)
return c:IsRelateToEffect(e) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_DECK)
end
function c22530212.activate(e,tp,eg,ep,ev,re,r,rp) function c22530212.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=eg:Filter(c22530212.filter,nil,e,1-tp) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()==0 then if g:GetCount()~=0 then
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
if sg:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then if g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE) then
Duel.Damage(1-tp,800,REASON_EFFECT) Duel.Damage(1-tp,800,REASON_EFFECT)
end end
end end
......
--RUM-クイック・カオス --RUM-クイック・カオス
function c33252803.initial_effect(c) function c33252803.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -12,16 +12,16 @@ function c33252803.initial_effect(c) ...@@ -12,16 +12,16 @@ function c33252803.initial_effect(c)
end end
function c33252803.filter1(c,e,tp) function c33252803.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048) return c:IsFaceup() and c:IsSetCard(0x48) and not c:IsSetCard(0x1048)
and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c.xyz_number) and Duel.IsExistingMatchingCard(c33252803.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,c:GetRank()+1,c.xyz_number)
end end
function c33252803.filter2(c,e,tp,rank,no) function c33252803.filter2(c,e,tp,rank,no)
return c:GetRank()==rank and c:IsSetCard(0x1048) and c.xyz_number==no return c:GetRank()==rank and c:IsSetCard(0x1048) and c.xyz_number==no
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
end end
function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c33252803.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33252803.filter1(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c33252803.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c33252803.filter1,tp,LOCATION_MZONE,0,1,nil,e,tp)end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c33252803.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c33252803.filter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
......
...@@ -23,7 +23,7 @@ function c34475451.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,7 @@ function c34475451.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c34475451.operation(e,tp,eg,ep,ev,re,r,rp) function c34475451.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if a:IsOnField() and a:IsFaceup() then if a:IsOnField() and a:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -13,7 +13,7 @@ function c35329581.initial_effect(c) ...@@ -13,7 +13,7 @@ function c35329581.initial_effect(c)
end end
function c35329581.filter(c,e,tp) function c35329581.filter(c,e,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e) return c:IsLocation(LOCATION_GRAVE) and c:IsCanBeEffectTarget(e)
and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c35329581.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c) and c:IsType(TYPE_SYNCHRO) and Duel.IsExistingMatchingCard(c35329581.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function c35329581.spfilter(c,e,tp,tc) function c35329581.spfilter(c,e,tp,tc)
......
--BF-竜巻のハリケーン --BF-竜巻のハリケーン
function c36442179.initial_effect(c) function c36442179.initial_effect(c)
--atk def --atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(36442179,0)) e1:SetDescription(aux.Stringid(36442179,0))
e1:SetCategory(CATEGORY_ATKCHANGE) e1:SetCategory(CATEGORY_ATKCHANGE)
...@@ -13,11 +13,11 @@ function c36442179.initial_effect(c) ...@@ -13,11 +13,11 @@ function c36442179.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c36442179.filter(c) function c36442179.filter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO) return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end end
function c36442179.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36442179.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 c36442179.filter(chkc) end if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c36442179.filter(chkc) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(c36442179.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c36442179.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c36442179.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
......
...@@ -16,13 +16,13 @@ function c41386308.initial_effect(c) ...@@ -16,13 +16,13 @@ function c41386308.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EVENT_BATTLE_DESTROYED) e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(c41386308.drcondition) e2:SetCondition(c41386308.drcon)
e2:SetTarget(c41386308.drtarget) e2:SetTarget(c41386308.drtg)
e2:SetOperation(c41386308.droperation) e2:SetOperation(c41386308.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c41386308.tgfilter(c) function c41386308.tgfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsLevelBelow(4) and c:IsAbleToGrave() return c:IsLevelBelow(4) and c:IsAbleToGrave()
end end
function c41386308.target(e,tp,eg,ep,ev,re,r,rp,chk) function c41386308.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c41386308.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c41386308.tgfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -35,17 +35,17 @@ function c41386308.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,17 +35,17 @@ function c41386308.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
function c41386308.drcondition(e,tp,eg,ep,ev,re,r,rp) function c41386308.drcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE)
end end
function c41386308.drtarget(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c41386308.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c41386308.droperation(e,tp,eg,ep,ev,re,r,rp) function c41386308.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function c42502956.filter(c,e,tp) ...@@ -15,7 +15,7 @@ function c42502956.filter(c,e,tp)
return c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_BEAST) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c42502956.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c42502956.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c42502956.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c42502956.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(c42502956.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c42502956.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
...@@ -24,18 +24,18 @@ function c42502956.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,18 +24,18 @@ function c42502956.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c42502956.activate(e,tp,eg,ep,ev,re,r,rp) function c42502956.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_MZONE,0,nil,RACE_BEAST+RACE_WINDBEAST+RACE_PLANT) local ct=Duel.GetMatchingGroupCount(Card.IsRace,tp,LOCATION_GRAVE,0,nil,RACE_BEAST+RACE_WINDBEAST+RACE_PLANT)
local tc1=g:GetFirst() tc=g:GetFirst()
while tc1 do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(200*ct) e1:SetValue(ct*-200)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc1=g:GetNext() tc=g:GetNext()
end end
end end
end end
...@@ -9,9 +9,12 @@ function c42776960.initial_effect(c) ...@@ -9,9 +9,12 @@ function c42776960.initial_effect(c)
e1:SetOperation(c42776960.activate) e1:SetOperation(c42776960.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c42776960.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c42776960.target(e,tp,eg,ep,ev,re,r,rp,chk) function c42776960.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsCanBeSpecialSummoned,tp,LOCATION_HAND,0,1,nil,e,tp,false,false) end and Duel.IsExistingMatchingCard(c42776960.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_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c42776960.activate(e,tp,eg,ep,ev,re,r,rp) function c42776960.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -22,7 +25,7 @@ function c42776960.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +25,7 @@ function c42776960.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst() local tc=g:GetFirst()
--dam --dam
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE) e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -32,15 +35,16 @@ function c42776960.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,15 +35,16 @@ function c42776960.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(1) e1:SetValue(1)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
--lose --lose
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetLabel(1-tp) e2:SetLabel(1-tp)
e2:SetOperation(c42776960.leaveop) e2:SetOperation(c42776960.leaveop)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
function c42776960.leaveop(e,tp,eg,ep,ev,re,r,rp) function c42776960.leaveop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_RELAY_SOUL=0x20 local WIN_REASON_RELAY_SOUL=0x1a
Duel.Win(e:GetLabel(),WIN_REASON_RELAY_SOUL) Duel.Win(e:GetLabel(),WIN_REASON_RELAY_SOUL)
end end
\ No newline at end of file
--突進 --決闘融合-バトル・フュージョン
function c43225434.initial_effect(c) function c43225434.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -7,36 +7,24 @@ function c43225434.initial_effect(c) ...@@ -7,36 +7,24 @@ function c43225434.initial_effect(c)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCountLimit(1,43225434+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,43225434+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c43225434.condition) e1:SetCondition(c43225434.condition)
e1:SetTarget(c43225434.target)
e1:SetOperation(c43225434.activate) e1:SetOperation(c43225434.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c43225434.condition(e,tp,eg,ep,ev,re,r,rp) function c43225434.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return (a:IsControler(tp) and a:IsType(TYPE_FUSION)) return at and (a:IsControler(tp) and a:IsType(TYPE_FUSION))
or (at and at:IsControler(tp) and at:IsFaceup() and a:IsType(TYPE_FUSION)) or (at:IsControler(tp) and at:IsFaceup() and a:IsType(TYPE_FUSION))
end
function c43225434.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c43225434.activate(e,tp,eg,ep,ev,re,r,rp) function c43225434.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if not a:IsRelateToBattle() or not d:IsRelateToBattle() then return end if a:IsControler(1-tp) then a,at=at,a end
if not a:IsRelateToBattle() or a:IsFacedown() or not at:IsRelateToBattle() or at:IsFacedown() then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetOwnerPlayer(tp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE)
if a:GetControler()==tp then e1:SetValue(at:GetAttack())
e1:SetValue(d:GetAttack()) a:RegisterEffect(e1)
a:RegisterEffect(e1)
else
e1:SetValue(a:GetAttack())
d:RegisterEffect(e1)
end
end end
...@@ -6,6 +6,7 @@ function c47264717.initial_effect(c) ...@@ -6,6 +6,7 @@ function c47264717.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK,0x11e0) e1:SetHintTiming(TIMING_ATTACK,0x11e0)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c47264717.condition) e1:SetCondition(c47264717.condition)
e1:SetTarget(c47264717.target) e1:SetTarget(c47264717.target)
e1:SetOperation(c47264717.activate) e1:SetOperation(c47264717.activate)
...@@ -17,14 +18,14 @@ end ...@@ -17,14 +18,14 @@ end
function c47264717.condition(e,tp,eg,ep,ev,re,r,rp) function c47264717.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c47264717.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(c47264717.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c4178474.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c47264717.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end if chkc then return chkc:IsOnField() and chkc:IsDestructable() and chkc~=e:GetHandler() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) 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_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler()) 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) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c4178474.activate(e,tp,eg,ep,ev,re,r,rp) function c47264717.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
......
...@@ -22,36 +22,31 @@ function c54447022.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,36 +22,31 @@ function c54447022.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c54447022.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c54447022.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c54447022.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and chkc:IsCanBeSpecialSummoned(e,0,tp,false,false) 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(Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,nil,e,0,tp,false,false) end and Duel.IsExistingTarget(c54447022.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,Card.IsCanBeSpecialSummoned,tp,LOCATION_GRAVE,0,1,ft,nil,e,0,tp,false,false) local g=Duel.SelectTarget(tp,c54447022.filter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end end
function c54447022.spop(e,tp,eg,ep,ev,re,r,rp) function c54447022.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsCanBeSpecialSummoned,nil,e,0,tp,false,false):Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>ft then if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil) sg=sg:Select(tp,ft,ft,nil)
end end
local tc=sg:GetFirst() local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local count=0
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
count=count+1000
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
local lp=Duel.GetLP(tp) local lp=Duel.GetLP(tp)
if lp<=count then if lp<=ct*1000 then
Duel.SetLP(tp,0) Duel.SetLP(tp,0)
else else
Duel.SetLP(tp,lp-count) Duel.SetLP(tp,lp-ct*1000)
end end
end end
--女神の聖剣-エアトス --女神の聖剣エアトス
function c55569674.initial_effect(c) function c55569674.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -22,7 +22,7 @@ function c55569674.initial_effect(c) ...@@ -22,7 +22,7 @@ function c55569674.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--atkage --atk
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(55569674,0)) e4:SetDescription(aux.Stringid(55569674,0))
e4:SetCategory(CATEGORY_ATKCHANGE) e4:SetCategory(CATEGORY_ATKCHANGE)
...@@ -53,11 +53,11 @@ end ...@@ -53,11 +53,11 @@ end
function c55569674.filter(c) function c55569674.filter(c)
return c:IsFaceup() and c:IsCode(34022290) return c:IsFaceup() and c:IsCode(34022290)
end end
function c55569674.atktg(e,tp,eg,ep,ev,re,r,rp,chk) function c55569674.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55569674.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c55569674.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c55569674.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c55569674.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c55569674.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c55569674.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c55569674.atkfilter(c) function c55569674.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsType(TYPE_MONSTER)
......
...@@ -33,15 +33,16 @@ function c60879050.initial_effect(c) ...@@ -33,15 +33,16 @@ function c60879050.initial_effect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_CANNOT_ATTACK) e5:SetCode(EFFECT_CANNOT_ATTACK)
e5:SetProperty(EFFECT_FLAG_OATH) e5:SetProperty(EFFECT_FLAG_OATH)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0) e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(c60879050.ftarget) e5:SetTarget(c60879050.ftarget)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c60879050.eqlimit(e,c) function c60879050.eqlimit(e,c)
return c:IsRelateToCard(e:GetHandler()) return e:GetHandler():GetEquipTarget()==c
end end
function c60879050.filter(c) function c60879050.filter(c)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH) return c:IsFaceup() and c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_EARTH)
end end
function c60879050.rmfilter(c) function c60879050.rmfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_MACHINE) and c:IsLevelAbove(10) and c:IsAbleToRemoveAsCost()
...@@ -62,13 +63,12 @@ function c60879050.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,13 +63,12 @@ function c60879050.operation(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 c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and tc:IsFaceup() then
tc:CreateRelation(c,RESET_EVENT+0x1fe0000)
Duel.Equip(tp,c,tc) Duel.Equip(tp,c,tc)
end end
end end
function c60879050.value(e,c) function c60879050.value(e,c)
return c:GetBaseAttack()*2 return c:GetAttack()*2
end end
function c60879050.ftarget(e,c) function c60879050.ftarget(e,c)
return e:GetHandler():GetEquipTarget():GetFieldID()~=c:GetFieldID() return e:GetHandler():GetEquipTarget()~=c
end end
\ No newline at end of file
...@@ -12,7 +12,7 @@ function c61692648.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -12,7 +12,7 @@ function c61692648.atkop(e,tp,eg,ep,ev,re,r,rp)
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_ATTACK_FINAL)
e1:SetValue(math.floor(c:GetBaseAttack()/2)) e1:SetValue(math.ceil(c:GetBaseAttack()/2))
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_DAMAGE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
\ No newline at end of file
...@@ -14,35 +14,28 @@ function c68535320.initial_effect(c) ...@@ -14,35 +14,28 @@ function c68535320.initial_effect(c)
end end
function c68535320.condition(e,tp,eg,ep,ev,re,r,rp) function c68535320.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_BATTLE) and rp~=tp return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp
end
function c68535320.dfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDestructable()
end end
function c68535320.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c68535320.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c68535320.dfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsDestructable() end
if chk==0 then return if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end
Duel.IsExistingTarget(c68535320.dfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c68535320.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c68535320.spfilter(c,e,tp) function c68535320.spfilter(c,e,tp)
return c:GetCode()==95929069 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(95929069) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c68535320.operation(e,tp,eg,ep,ev,re,r,rp) function c68535320.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c68535320.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c68535320.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.Destroy(tc,REASON_EFFECT) if Duel.Destroy(tc,REASON_EFFECT)~=0 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(68535320,1)) and Duel.SelectYesNo(tp,aux.Stringid(68535320,1)) then
and g:GetCount()>0 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
then
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
--CNo.5亡朧龍カオス・キマイラ・ドラゴン --CNo.5 亡朧龍カオス・キマイラ・ドラゴン
function c69757518.initial_effect(c) function c69757518.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,7),3) aux.AddXyzProcedure(c,aux.XyzFilterFunction(c,6),3,nil,nil,5)
c:EnableReviveLimit() c:EnableReviveLimit()
--atk --atk
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -19,7 +19,7 @@ function c69757518.initial_effect(c) ...@@ -19,7 +19,7 @@ function c69757518.initial_effect(c)
e2:SetCondition(c69757518.atcon) e2:SetCondition(c69757518.atcon)
e2:SetCost(c69757518.atcost) e2:SetCost(c69757518.atcost)
e2:SetOperation(c69757518.atop) e2:SetOperation(c69757518.atop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TODECK) e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
...@@ -29,7 +29,7 @@ function c69757518.initial_effect(c) ...@@ -29,7 +29,7 @@ function c69757518.initial_effect(c)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCost(c69757518.cost) e3:SetCost(c69757518.cost)
e3:SetTarget(c69757518.target) e3:SetTarget(c69757518.target)
e3:SetOperation(c69757518.activate) e3:SetOperation(c69757518.operation)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
c69757518.xyz_number=5 c69757518.xyz_number=5
...@@ -38,7 +38,7 @@ function c69757518.atkval(e,c) ...@@ -38,7 +38,7 @@ function c69757518.atkval(e,c)
end end
function c69757518.atcon(e,tp,eg,ep,ev,re,r,rp) function c69757518.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return Duel.GetAttacker()==c and c:IsChainAttackable() return Duel.GetAttacker()==c and c:IsChainAttackable()
end end
function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk) function c69757518.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
...@@ -61,16 +61,16 @@ function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -61,16 +61,16 @@ function c69757518.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,2,0,0)
end end
function c69757518.activate(e,tp,eg,ep,ev,re,r,rp) function c69757518.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e) local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>1 then if sg:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg1=sg:Select(tp,1,1,nil) local sg1=sg:Select(tp,1,1,nil)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT) and c:IsRelateToEffect(e)then if Duel.SendtoDeck(sg1,nil,0,REASON_EFFECT) and c:IsRelateToEffect(e) then
sg:Sub(sg1) sg:Sub(sg1)
Duel.Overlay(c,sg) Duel.Overlay(c,sg)
end end
end end
end end
\ No newline at end of file
...@@ -22,7 +22,7 @@ function c7080743.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,7 +22,7 @@ function c7080743.efop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCondition(c7080743.atkcon) e1:SetCondition(c7080743.atkcon)
e1:SetOperation(c7080743.atkop) e1:SetOperation(c7080743.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1) rc:RegisterEffect(e1,true)
if not rc:IsType(TYPE_EFFECT) then if not rc:IsType(TYPE_EFFECT) then
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -5,18 +5,17 @@ function c72714226.initial_effect(c) ...@@ -5,18 +5,17 @@ function c72714226.initial_effect(c)
e1:SetDescription(aux.Stringid(72714226,0)) e1:SetDescription(aux.Stringid(72714226,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c72714226.condition) e1:SetCondition(c72714226.condition)
e1:SetTarget(c72714226.target) e1:SetTarget(c72714226.target)
e1:SetOperation(c72714226.operation) e1:SetOperation(c72714226.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c72714226.condition(e,tp,eg,ep,ev,re,r,rp) function c72714226.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE) return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end end
function c72714226.filter(c,e,tp) function c72714226.filter(c,e,tp)
return c:GetCode()==72714226 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsCode(72714226) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -25,16 +24,14 @@ function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -25,16 +24,14 @@ function c72714226.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c72714226.operation(e,tp,eg,ep,ev,re,r,rp) function c72714226.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct==0 then return end if ct<=0 then return end
local g=Duel.GetMatchingGroup(c72714226.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c72714226.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local t1=g:GetFirst() local tc1=g:GetFirst()
local t2=g:GetNext() local tc2=g:GetNext()
Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,t1) if tc2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(72714226,1)) then
if t2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(72714226,1)) then Duel.SpecialSummonStep(tc2,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,t2)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
......
...@@ -4,7 +4,7 @@ function c72930878.initial_effect(c) ...@@ -4,7 +4,7 @@ function c72930878.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c72930878.condition) e1:SetCondition(c72930878.condition)
e1:SetTarget(c72930878.target) e1:SetTarget(c72930878.target)
e1:SetOperation(c72930878.activate) e1:SetOperation(c72930878.activate)
...@@ -16,18 +16,19 @@ function c72930878.initial_effect(c) ...@@ -16,18 +16,19 @@ function c72930878.initial_effect(c)
e2:SetCondition(c72930878.handcon) e2:SetCondition(c72930878.handcon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c72930878.handcon(e)
return Duel.GetMatchingGroupCount(c72930878.cfilter,e:GetHandler():GetControler(),LOCATION_MZONE,0,nil)==3
end
function c72930878.cfilter(c) function c72930878.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x33) return c:IsFaceup() and c:IsSetCard(0x33)
end end
function c72930878.handcon(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_MZONE,0)
return g:GetCount()==3 and g:IsExists(c72930878.cfilter,3,nil)
end
function c72930878.condition(e,tp,eg,ep,ev,re,r,rp) function c72930878.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=Duel.GetAttackTarget()
return tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0x33) return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsSetCard(0x33)
end end
function c72930878.filter(c) function c72930878.filter(c)
return c:IsAttackPos() and c:IsAbleToRemove() return c:IsPosition(POS_FACEUP_ATTACK) and c:IsAbleToRemove()
end end
function c72930878.target(e,tp,eg,ep,ev,re,r,rp,chk) function c72930878.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c72930878.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c72930878.filter,tp,0,LOCATION_MZONE,1,nil) end
......
--BF-突風のオロシ --BF-突風のオロシ
function c73652465.initial_effect(c) function c73652465.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -11,7 +11,7 @@ function c73652465.initial_effect(c) ...@@ -11,7 +11,7 @@ function c73652465.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--position --position
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(25652655,1)) e2:SetDescription(aux.Stringid(73652465,0))
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
...@@ -26,9 +26,9 @@ function c73652465.filter(c) ...@@ -26,9 +26,9 @@ function c73652465.filter(c)
end end
function c73652465.spcon(e,c) function c73652465.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
Duel.IsExistingMatchingCard(c73652465.filter,c:GetControler(),LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c73652465.filter,c:GetControler(),LOCATION_MZONE,0,1,nil)
and Duel.GetFlagEffect(tp,73652465)==0 and Duel.GetFlagEffect(c:GetControler(),73652465)==0
end end
function c73652465.spop(e,tp,eg,ep,ev,re,r,rp) function c73652465.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(tp,73652465,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,73652465,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
...@@ -38,14 +38,14 @@ function c73652465.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,14 +38,14 @@ function c73652465.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c73652465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c73652465.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) end if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end end
function c73652465.operation(e,tp,eg,ep,ev,re,r,rp) function c73652465.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK) Duel.ChangePosition(tc,POS_FACEUP_DEFENCE,POS_FACEDOWN_DEFENCE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end end
end end
......
...@@ -10,37 +10,36 @@ function c74875003.initial_effect(c) ...@@ -10,37 +10,36 @@ function c74875003.initial_effect(c)
e1:SetTarget(c74875003.target) e1:SetTarget(c74875003.target)
e1:SetOperation(c74875003.operation) e1:SetOperation(c74875003.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- local e2=e1:Clone()
local e5=e1:Clone() e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
local e6=e1:Clone()
e6:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e6)
--release limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone() local e3=e1:Clone()
e3:SetCode(EFFECT_UNRELEASABLE_SUM) e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
e3:SetValue(c74875003.sumval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
-- --release limit
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetCode(EFFECT_UNRELEASABLE_NONSUM)
e4:SetTargetRange(1,0) e4:SetValue(1)
e4:SetTarget(c74875003.splimit)
c:RegisterEffect(e4) c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_UNRELEASABLE_SUM)
e5:SetValue(c74875003.sumval)
c:RegisterEffect(e5)
--
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(1,0)
e6:SetTarget(c74875003.splimit)
c:RegisterEffect(e6)
end end
function c74875003.filter(c,e,tp) function c74875003.filter(c,e,tp)
return c:GetCode()==74875003 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsCode(74875003) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c74875003.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74875003.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -48,25 +47,17 @@ function c74875003.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,25 +47,17 @@ function c74875003.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end end
function c74875003.operation(e,tp,eg,ep,ev,re,r,rp) function c74875003.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct==0 then return end if ft>2 then ft=2 end
local g=Duel.GetMatchingGroup(c74875003.filter,tp,LOCATION_DECK+LOCATION_HAND,0,nil,e,tp) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74875003.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,ft,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
local t1=g:GetFirst() Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local t2=g:GetNext()
Duel.SpecialSummonStep(t1,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,t1)
if t2 and ct>1 and Duel.SelectYesNo(tp,aux.Stringid(74875003,1)) then
Duel.SpecialSummonStep(t2,0,tp,tp,false,false,POS_FACEUP)
Duel.ConfirmCards(1-tp,t2)
end
Duel.SpecialSummonComplete()
end end
end end
function c74875003.sumval(c) function c74875003.sumval(c)
return c:GetCode()==10000000 or c:GetCode()==10000010 or c:GetCode()==10000020 return not c:IsCode(10000000) and not c:IsCode(10000010) and not c:IsCode(10000020)
end end
function c74875003.splimit(e,c,sump,sumtype,sumpos,targetp,se) function c74875003.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not se:GetHandler():IsCode(74875003) return not se:GetHandler():IsCode(74875003)
end end
\ No newline at end of file
...@@ -9,17 +9,14 @@ function c79997591.initial_effect(c) ...@@ -9,17 +9,14 @@ function c79997591.initial_effect(c)
e1:SetOperation(c79997591.cbop) e1:SetOperation(c79997591.cbop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c79997591.filter(c,tp)
return c:IsFaceup() and c:IsAttackPos() and c:GetControler()==tp
end
function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp) function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp)
local bt=Duel.GetAttackTarget() local bt=Duel.GetAttackTarget()
return bt and c79997591.filter(bt,e:GetHandlerPlayer()) return bt and bt:IsPosition(POS_FACEUP_ATTACK) and bt:IsControler(tp)
end end
function c79997591.cbop(e,tp,eg,ep,ev,re,r,rp) function c79997591.cbop(e,tp,eg,ep,ev,re,r,rp)
local bt=Duel.GetAttackTarget() local bt=Duel.GetAttackTarget()
Duel.ChangeAttackTarget(nil) Duel.ChangeAttackTarget(nil)
if bt and c79997591.filter(bt,e:GetHandlerPlayer()) then if bt:IsRelateToBattle() and bt:IsControler(tp) then
Duel.Damage(1-tp,bt:GetAttack(),REASON_EFFECT) Duel.Damage(1-tp,bt:GetAttack(),REASON_EFFECT)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
--ハネクリボー LV10 --伝説の騎士 ティマイオス
function c80019195.initial_effect(c) function c80019195.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--cannot special summon --cannot special summon
...@@ -12,12 +12,12 @@ function c80019195.initial_effect(c) ...@@ -12,12 +12,12 @@ function c80019195.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(80019195,0)) e2:SetDescription(aux.Stringid(80019195,0))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c80019195.destg) e2:SetTarget(c80019195.rmtg)
e2:SetOperation(c80019195.desop) e2:SetOperation(c80019195.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--set --set
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80019195,1)) e3:SetDescription(aux.Stringid(80019195,1))
...@@ -28,28 +28,24 @@ function c80019195.initial_effect(c) ...@@ -28,28 +28,24 @@ function c80019195.initial_effect(c)
e3:SetOperation(c80019195.setop) e3:SetOperation(c80019195.setop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c80019195.desfilter(c) function c80019195.rmfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemove() and c:IsFaceup()
end end
function c80019195.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80019195.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c80019195.desfilter(chkc) end if chkc then return chkc:IsOnField() and c80019195.rmfilter(chkc) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(c80019195.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,c80019195.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c80019195.rmfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c80019195.desop(e,tp,eg,ep,ev,re,r,rp) function c80019195.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Destroy(tc,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
function c80019195.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFlagEffect(tp,80019195)==0 end
Duel.RegisterFlagEffect(tp,80019195,RESET_PHASE+PHASE_END,0,1)
end
function c80019195.setfilter(c) function c80019195.setfilter(c)
return c:GetType()==TYPE_SPELL and c:IsSSetable() return c:IsType(TYPE_SPELL) and c:IsSSetable()
end end
function c80019195.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c80019195.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80019195.setfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c80019195.setfilter(chkc) end
......
...@@ -22,15 +22,15 @@ function c80831721.initial_effect(c) ...@@ -22,15 +22,15 @@ function c80831721.initial_effect(c)
e2:SetOperation(c80831721.atkop) e2:SetOperation(c80831721.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c80831721.condition(e) function c80831721.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0x1003) return Duel.IsExistingMatchingCard(Card.IsSetCard,tp,LOCATION_GRAVE,0,1,nil,0xa4)
end end
function c80831721.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c80831721.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2)) Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end end
function c80831721.filter(c) function c80831721.filter(c)
return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsSetCard(0x46) and c:IsAbleToHand()
end end
function c80831721.target(e,tp,eg,ep,ev,re,r,rp,chk) function c80831721.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80831721.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c80831721.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -38,10 +38,10 @@ function c80831721.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,10 +38,10 @@ function c80831721.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c80831721.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c80831721.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.GetFirstMatchingCard(c80831721.filter,tp,LOCATION_DECK,0,nil) local g=Duel.SelectMatchingCard(tp,c80831721.filter,tp,LOCATION_DECK,0,1,1,nil)
if tg then if g:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,g)
end end
end end
function c80831721.rfilter(c) function c80831721.rfilter(c)
......
...@@ -6,14 +6,14 @@ function c8102334.initial_effect(c) ...@@ -6,14 +6,14 @@ function c8102334.initial_effect(c)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_SZONE) e1:SetTargetRange(0,LOCATION_SZONE)
e1:SetTarget(c8102334.distarget) e1:SetTarget(c8102334.distg)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable effect --disable effect
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c8102334.disoperation) e2:SetOperation(c8102334.disop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--prevent counter --prevent counter
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -22,7 +22,6 @@ function c8102334.initial_effect(c) ...@@ -22,7 +22,6 @@ function c8102334.initial_effect(c)
e3:SetCode(EFFECT_CANNOT_PLACE_COUNTER) e3:SetCode(EFFECT_CANNOT_PLACE_COUNTER)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(0,1) e3:SetTargetRange(0,1)
e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--target --target
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -35,10 +34,10 @@ function c8102334.initial_effect(c) ...@@ -35,10 +34,10 @@ function c8102334.initial_effect(c)
e4:SetValue(c8102334.tgvalue) e4:SetValue(c8102334.tgvalue)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c8102334.distarget(e,c) function c8102334.distg(e,c)
return c~=e:GetHandler() and c:IsType(TYPE_FIELD) return c:IsType(TYPE_FIELD)
end end
function c8102334.disoperation(e,tp,eg,ep,ev,re,r,rp) function c8102334.disop(e,tp,eg,ep,ev,re,r,rp)
local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION) local tl=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if tl==LOCATION_SZONE and re:IsActiveType(TYPE_FIELD) then if tl==LOCATION_SZONE and re:IsActiveType(TYPE_FIELD) then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
...@@ -49,4 +48,4 @@ function c8102334.tglimit(e,c) ...@@ -49,4 +48,4 @@ function c8102334.tglimit(e,c)
end end
function c8102334.tgvalue(e,re,rp) function c8102334.tgvalue(e,re,rp)
return rp~=e:GetHandlerPlayer() return rp~=e:GetHandlerPlayer()
end end
\ No newline at end of file
--死神の大鎌 - デスサイス --死神の大鎌デスサイス
function c81954378.initial_effect(c) function c81954378.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -42,22 +42,6 @@ function c81954378.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,22 +42,6 @@ function c81954378.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Equip(tp,e:GetHandler(),tc) Duel.Equip(tp,e:GetHandler(),tc)
end end
end end
function c81954378.etarget(e,c)
local ec=e:GetHandler():GetEquipTarget()
return c:IsType(TYPE_TRAP) and ec and c:GetControler()==ec:GetControler()
end
function c81954378.efilter(e,re)
return re:GetHandler()==e:GetHandler():GetEquipTarget()
end
function c81954378.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
if tc and tc:IsLocation(LOCATION_MZONE) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c81954378.atkfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c81954378.value(e,c) function c81954378.value(e,c)
return Duel.GetMatchingGroupCount(c81954378.atkfilter,0,LOCATION_GRAVE,LOCATION_GRAVE,nil)*500 return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*500
end end
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c89719143.initial_effect(c) function c89719143.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -13,27 +13,26 @@ function c89719143.initial_effect(c) ...@@ -13,27 +13,26 @@ function c89719143.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c89719143.condition(e,tp,eg,ep,ev,re,r,rp) function c89719143.condition(e,tp,eg,ep,ev,re,r,rp)
local bt=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
return bt and bt:IsType(TYPE_FUSION) and at and at:IsType(TYPE_FUSION) return a:IsFaceup() and a:IsType(TYPE_FUSION) and at and at:IsFaceup() and at:IsType(TYPE_FUSION)
end
function c89719143.filter(c)
return c:IsFaceup() and c:IsDestructable()
end end
function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c89719143.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local bt=Duel.GetAttacker() local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget() local at=Duel.GetAttackTarget()
if chkc then return chkc==bt or chkc==at end if chkc then return chkc==a or chkc==at end
if chk==0 then return bt:IsOnField() and bt:IsCanBeEffectTarget(e) and at:IsOnField() and at:IsCanBeEffectTarget(e) end if chk==0 then return a:IsOnField() and a:IsCanBeEffectTarget(e) and at:IsOnField() and at:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(bt) Duel.SetTargetCard(a)
Duel.SetTargetCard(at) Duel.SetTargetCard(at)
local dam=bt:GetAttack()+at:GetAttack() local dam=a:GetAttack()+at:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,PLAYER_ALL,dam)
end end
function c89719143.activate(e,tp,eg,ep,ev,re,r,rp) function c89719143.activate(e,tp,eg,ep,ev,re,r,rp)
local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local tc1,tc2=Duel.GetFirstTarget()
if not tc1:IsRelateToEffect(e) or tc1:IsFacedown() or not tc2:IsRelateToEffect(e) or tc2:IsFacedown() then return end
local dam=tc1:GetAttack()+tc2:GetAttack()
if Duel.NegateAttack() then if Duel.NegateAttack() then
Duel.Damage(1-tp,d,REASON_EFFECT) Duel.Damage(1-tp,dam,REASON_EFFECT)
Duel.Damage(tp,d,REASON_EFFECT) Duel.Damage(tp,dam,REASON_EFFECT)
end end
end end
--BF-隠れ蓑のスチーム --BF-隠れ蓑のスチーム
function c9047460.initial_effect(c) function c9047460.initial_effect(c)
--token --token
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -23,7 +23,7 @@ function c9047460.initial_effect(c) ...@@ -23,7 +23,7 @@ function c9047460.initial_effect(c)
end end
function c9047460.tkcon(e,tp,eg,ep,ev,re,r,rp) function c9047460.tkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPosition(POS_FACEUP) and c:GetLocation()~=LOCATION_DECK return c:IsFaceup() and c:GetLocation()~=LOCATION_DECK
end end
function c9047460.tktg(e,tp,eg,ep,ev,re,r,rp,chk) function c9047460.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
...@@ -49,9 +49,9 @@ function c9047460.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,9 +49,9 @@ function c9047460.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9047460.spop(e,tp,eg,ep,ev,re,r,rp) function c9047460.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM) e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
...@@ -59,6 +59,7 @@ function c9047460.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,6 +59,7 @@ function c9047460.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(c9047460.syntg) e1:SetTarget(c9047460.syntg)
e1:SetValue(1) e1:SetValue(1)
e1:SetOperation(c9047460.synop) e1:SetOperation(c9047460.synop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
......
--ホープ剣スラッシュ --ホープ剣スラッシュ
function c94807487.initial_effect(c) function c94807487.initial_effect(c)
c:EnableCounterPermit(0x95)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
...@@ -51,14 +50,11 @@ end ...@@ -51,14 +50,11 @@ end
function c94807487.eqlimit(e,c) function c94807487.eqlimit(e,c)
return c:IsSetCard(0x7f) return c:IsSetCard(0x7f)
end end
function c94807487.tglimit(e,re,rp)
return rp~=e:GetHandlerPlayer() and re:IsActiveType(TYPE_TRAP+TYPE_MONSTER)
end
function c94807487.filter(c) function c94807487.filter(c)
return c:IsFaceup() and c:IsSetCard(0x7f) return c:IsFaceup() and c:IsSetCard(0x7f)
end end
function c94807487.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94807487.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c94807487.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94807487.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c94807487.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
...@@ -72,10 +68,10 @@ function c94807487.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,10 +68,10 @@ function c94807487.operation(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c94807487.regop(e,tp,eg,ep,ev,re,r,rp) function c94807487.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x95,1) e:GetHandler():AddCounter(0x31,1)
end end
function c94807487.value(e,c) function c94807487.value(e,c)
return e:GetHandler():GetCounter(0x95)*500 return e:GetHandler():GetCounter(0x31)*500
end end
function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp) function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ) return bit.band(r,REASON_COST)~=0 and re:GetHandler():IsType(TYPE_XYZ)
...@@ -83,10 +79,8 @@ function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,10 +79,8 @@ function c94807487.rcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c94807487.rop(e,tp,eg,ep,ev,re,r,rp) function c94807487.rop(e,tp,eg,ep,ev,re,r,rp)
local ct=bit.band(ev,0xffff) local ct=bit.band(ev,0xffff)
if ct==1 then Duel.SendtoGrave(e:GetHandler(),REASON_COST)
Duel.SendtoGrave(e:GetHandler(),REASON_COST) if ct>1 then
else
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST) re:GetHandler():RemoveOverlayCard(tp,ct-1,ct-1,REASON_COST)
end end
end end
\ No newline at end of file
...@@ -14,35 +14,31 @@ function c95929069.initial_effect(c) ...@@ -14,35 +14,31 @@ function c95929069.initial_effect(c)
end end
function c95929069.condition(e,tp,eg,ep,ev,re,r,rp) function c95929069.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY+REASON_BATTLE) and rp~=tp return c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and rp~=tp
end end
function c95929069.dfilter(c) function c95929069.dfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c95929069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95929069.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c95929069.dfilter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c95929069.dfilter(chkc) end
if chk==0 then return if chk==0 then return Duel.IsExistingTarget(c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.IsExistingTarget(c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c95929069.dfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c95929069.spfilter(c,e,tp) function c95929069.spfilter(c,e,tp)
return c:GetCode()==68535320 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(68535320) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95929069.operation(e,tp,eg,ep,ev,re,r,rp) function c95929069.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
local g=Duel.GetMatchingGroup(c95929069.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c95929069.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if Duel.Destroy(tc,REASON_EFFECT) if Duel.Destroy(tc,REASON_EFFECT)~=0 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(95929069,1)) and Duel.SelectYesNo(tp,aux.Stringid(95929069,1)) then
and g:GetCount()>0 Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
then
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.BreakEffect() Duel.BreakEffect()
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end end
end end
end end
\ No newline at end of file
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