Commit 27501bfb authored by VanillaSalt's avatar VanillaSalt

fix

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