Commit a0b5016c authored by mercury233's avatar mercury233

update scripts

parent d0f42c8f
...@@ -17,7 +17,7 @@ function c100200166.initial_effect(c) ...@@ -17,7 +17,7 @@ function c100200166.initial_effect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(c100200166.target) e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x99))
e2:SetCondition(c100200166.indcon) e2:SetCondition(c100200166.indcon)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -28,7 +28,7 @@ function c100200166.initial_effect(c) ...@@ -28,7 +28,7 @@ function c100200166.initial_effect(c)
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c100200166.target) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x99))
e3:SetCondition(c100200166.indcon) e3:SetCondition(c100200166.indcon)
e3:SetValue(1) e3:SetValue(1)
c:RegisterEffect(e3) c:RegisterEffect(e3)
...@@ -47,14 +47,11 @@ function c100200166.cfilter(c) ...@@ -47,14 +47,11 @@ function c100200166.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x99) return c:IsFaceup() and c:IsSetCard(0x99)
end end
function c100200166.atcon(e) function c100200166.atcon(e)
return Duel.IsExistingMatchingCard(c100200166.cfilter,e:GetOwnerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(c100200166.cfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c100200166.indcon(e) function c100200166.indcon(e)
return e:GetHandler():IsDefensePos() return e:GetHandler():IsDefensePos()
end end
function c100200166.target(e,c)
return c~=e:GetHandler() and c:IsSetCard(0x99)
end
function c100200166.scfilter1(c,e,tp,mc) function c100200166.scfilter1(c,e,tp,mc)
local mg=Group.FromCards(c,mc) local mg=Group.FromCards(c,mc)
return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevel(1) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -63,14 +60,15 @@ end ...@@ -63,14 +60,15 @@ end
function c100200166.scfilter2(c,mg) function c100200166.scfilter2(c,mg)
return c:IsSynchroSummonable(nil,mg) return c:IsSynchroSummonable(nil,mg)
end end
function c100200166.sctg(e,tp,eg,ep,ev,re,r,rp,chk) function c100200166.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler() local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100200166.scfilter1(chkc,e,tp,c) end
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end and Duel.IsExistingTarget(c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,nil,e,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c) local g=Duel.SelectTarget(tp,c100200166.scfilter1,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,c)
Duel.SetOperationInfo(g,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(g,CATEGORY_SPECIAL_SUMMON,g,2,tp,LOCATION_EXTRA)
end end
function c100200166.scop(e,tp,eg,ep,ev,re,r,rp) function c100200166.scop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
......
...@@ -8,6 +8,7 @@ function c100200167.initial_effect(c) ...@@ -8,6 +8,7 @@ function c100200167.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100200167)
e1:SetCondition(c100200167.condition) e1:SetCondition(c100200167.condition)
e1:SetTarget(c100200167.sptg) e1:SetTarget(c100200167.sptg)
e1:SetOperation(c100200167.spop) e1:SetOperation(c100200167.spop)
...@@ -16,7 +17,7 @@ function c100200167.initial_effect(c) ...@@ -16,7 +17,7 @@ function c100200167.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,100200267)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(c100200167.lvtg) e2:SetTarget(c100200167.lvtg)
e2:SetOperation(c100200167.lvop) e2:SetOperation(c100200167.lvop)
...@@ -60,7 +61,7 @@ function c100200167.lvfilter(c,lv) ...@@ -60,7 +61,7 @@ function c100200167.lvfilter(c,lv)
end end
function c100200167.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100200167.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lv=e:GetHandler():GetLevel() local lv=e:GetHandler():GetLevel()
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and chkc:IsType(TYPE_MONSTER) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c100200167.lvfilter(chkc,lv) end
if chk==0 then return Duel.IsExistingTarget(c100200167.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv) end if chk==0 then return Duel.IsExistingTarget(c100200167.lvfilter,tp,LOCATION_MZONE,0,1,nil,lv) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c100200167.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,lv) Duel.SelectTarget(tp,c100200167.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,lv)
......
...@@ -76,7 +76,7 @@ function c100200168.disfilter2(c) ...@@ -76,7 +76,7 @@ function c100200168.disfilter2(c)
return aux.disfilter1(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM) return aux.disfilter1(c) and c:IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function c100200168.distg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100200168.distg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c100200168.disfilter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c100200168.disfilter2(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100200168.disfilter2,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c100200168.disfilter2,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100200168.disfilter2,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c100200168.disfilter2,tp,0,LOCATION_MZONE,1,1,nil)
......
...@@ -75,12 +75,9 @@ end ...@@ -75,12 +75,9 @@ end
function c100252001.nttg(e,c) function c100252001.nttg(e,c)
return c:IsLevelAbove(5) and c:IsSetCard(0xaf) return c:IsLevelAbove(5) and c:IsSetCard(0xaf)
end end
function c100252001.cfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c100252001.effcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100252001.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c100252001.cfilter,1,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,c100252001.cfilter,1,1,e:GetHandler()) local g=Duel.SelectReleaseGroup(tp,nil,1,1,e:GetHandler())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c100252001.effcon(e,tp,eg,ep,ev,re,r,rp) function c100252001.effcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -152,7 +149,6 @@ function c100252001.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -152,7 +149,6 @@ function c100252001.atkop(e,tp,eg,ep,ev,re,r,rp)
local lp=Duel.GetLP(1-tp) local lp=Duel.GetLP(1-tp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
e1:SetValue(lp) e1:SetValue(lp)
......
...@@ -56,7 +56,7 @@ function c101010011.filter(c,e,tp) ...@@ -56,7 +56,7 @@ function c101010011.filter(c,e,tp)
return not c:IsCode(101010011) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,131,tp,false,false) return not c:IsCode(101010011) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,131,tp,false,false)
end end
function c101010011.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010011.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101010011.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c101010011.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -25,7 +25,7 @@ function c101010012.initial_effect(c) ...@@ -25,7 +25,7 @@ function c101010012.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101010012.costfilter(c,ec) function c101010012.costfilter(c,ec)
return c:IsSetCard(0x19) and not c:IsCode(ec:GetCode()) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() return c:IsSetCard(0x19) and not c:IsCode(101010012) and not c:IsCode(ec:GetCode()) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end end
function c101010012.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101010012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,7 +65,7 @@ function c101010012.filter(c,e,tp) ...@@ -65,7 +65,7 @@ function c101010012.filter(c,e,tp)
return not c:IsCode(101010012) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,132,tp,false,false) return not c:IsCode(101010012) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,132,tp,false,false)
end end
function c101010012.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010012.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101010012.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c101010012.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -17,7 +17,7 @@ function c101010013.initial_effect(c) ...@@ -17,7 +17,7 @@ function c101010013.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetCondition(aux.gbspcon) e2:SetCondition(aux.gbspcon)
e2:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(500) e2:SetValue(500)
...@@ -65,7 +65,7 @@ function c101010013.filter(c,e,tp) ...@@ -65,7 +65,7 @@ function c101010013.filter(c,e,tp)
return not c:IsCode(101010013) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,133,tp,false,false) return not c:IsCode(101010013) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,133,tp,false,false)
end end
function c101010013.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010013.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101010013.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c101010013.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
--闇の精霊 ルーナ --闇の精霊 ルーナ
-- --
--Script by DJ --Script by DJ
function c101010027.initial_effect(c) function c101010027.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101010027.spcon) e1:SetCondition(c101010027.spcon)
e1:SetOperation(c101010027.spop) e1:SetOperation(c101010027.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--damage --damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DAMAGE) e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCondition(c101010027.damcon) e2:SetCondition(c101010027.damcon)
e2:SetTarget(c101010027.damtg) e2:SetTarget(c101010027.damtg)
e2:SetOperation(c101010027.damop) e2:SetOperation(c101010027.damop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101010027.spfilter(c) function c101010027.spfilter(c)
return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost() return c:IsAttribute(ATTRIBUTE_DARK) and c:IsAbleToRemoveAsCost()
end end
function c101010027.spcon(e,c) function c101010027.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101010027.spfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(c101010027.spfilter,tp,LOCATION_GRAVE,0,1,nil)
end end
function c101010027.spop(e,tp,eg,ep,ev,re,r,rp,c) function c101010027.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101010027.spfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101010027.spfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101010027.damcon(e,tp,eg,ep,ev,re,r,rp) function c101010027.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c101010027.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010027.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500) Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end end
function c101010027.damop(e,tp,eg,ep,ev,re,r,rp) function c101010027.damop(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.Damage(p,d,REASON_EFFECT) Duel.Damage(p,d,REASON_EFFECT)
end end
...@@ -5,40 +5,44 @@ function c101010028.initial_effect(c) ...@@ -5,40 +5,44 @@ function c101010028.initial_effect(c)
--reg --reg
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_REMOVE) e0:SetCode(EVENT_REMOVE)
e0:SetOperation(c101010028.rmop) e0:SetOperation(c101010028.rmop)
c:RegisterEffect(e0) c:RegisterEffect(e0)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_REMOVED) e1:SetRange(LOCATION_REMOVED)
e1:SetCountLimit(1) e1:SetCountLimit(1,101010028)
e1:SetCondition(c101010028.spcon) e1:SetCondition(c101010028.spcon)
e1:SetTarget(c101010028.sptg) e1:SetTarget(c101010028.sptg)
e1:SetOperation(c101010028.spop) e1:SetOperation(c101010028.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101010028.rmop(e,tp,eg,ep,ev,re,r,rp,chk) function c101010028.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
c:RegisterFlagEffect(101010028,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) c:RegisterFlagEffect(101010028,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
function c101010028.spcon(e,tp,eg,ep,ev,re,r,rp) function c101010028.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101010028)~=0 return e:GetHandler():GetFlagEffect(101010028)~=0
end end
function c101010028.rmfilter(c,tp)
return c:IsAbleToRemove() and Duel.GetMZoneCount(tp,c)>0
end
function c101010028.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010028.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return Duel.IsExistingMatchingCard(c101010028.rmfilter,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,nil,tp)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
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 c101010028.spop(e,tp,eg,ep,ev,re,r,rp,chk) function c101010028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101010028.rmfilter),tp,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 then if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end end
end end
...@@ -5,7 +5,7 @@ function c101010033.initial_effect(c) ...@@ -5,7 +5,7 @@ function c101010033.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--fusion --fusion
aux.AddFusionProcCodeFun(c,101010013,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),2,true,true) aux.AddFusionProcCodeFun(c,101010013,aux.FilterBoolFunction(Card.IsFusionSetCard,0x19),2,true,true)
aux.AddContactFusionProcedure(c,c101010033.cfilter,LOCATION_ONFIELD,0,aux.tdcfop(c)):SetValue(1) aux.AddContactFusionProcedure(c,c101010033.cfilter,LOCATION_ONFIELD,0,aux.tdcfop(c))
--spsummon condition --spsummon condition
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -80,7 +80,7 @@ function c101010033.filter(c,e,tp) ...@@ -80,7 +80,7 @@ function c101010033.filter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,134,tp,false,false) return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,134,tp,false,false)
end end
function c101010033.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010033.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0
and Duel.IsExistingMatchingCard(c101010033.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c101010033.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
......
...@@ -72,8 +72,10 @@ function c101010046.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,8 +72,10 @@ function c101010046.spop(e,tp,eg,ep,ev,re,r,rp)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101010046.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc) local g=Duel.SelectMatchingCard(tp,c101010046.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp,tc)
if g:GetCount()>0 then local tc=g:GetFirst()
Duel.SpecialSummon(g,135,tp,tp,false,false,POS_FACEUP) if tc then
Duel.SpecialSummon(tc,135,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(tc:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD+RESET_DISABLE,0,0)
end end
end end
end end
...@@ -60,9 +60,9 @@ function c101010048.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -60,9 +60,9 @@ function c101010048.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c101010048.disfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c101010048.disfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
if Duel.GetCurrentPhase()==PHASE_STANDBY then if Duel.GetCurrentPhase()==PHASE_STANDBY then
e:GetHandler():RegisterFlagEffect(101010048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,2,Duel.GetTurnCount()) e:GetHandler():RegisterFlagEffect(101010048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,2,Duel.GetTurnCount())
else else
e:GetHandler():RegisterFlagEffect(101010048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,0,1,0) e:GetHandler():RegisterFlagEffect(101010048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY,EFFECT_FLAG_OATH,1,0)
end end
end end
function c101010048.disop(e,tp,eg,ep,ev,re,r,rp) function c101010048.disop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -36,70 +36,38 @@ function c101010057.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,70 +36,38 @@ function c101010057.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end end
function c101010057.filter0(c)
return c:IsAbleToDeck()
end
function c101010057.filter1(c,e) function c101010057.filter1(c,e)
return c:IsAbleToDeck() and not c:IsImmuneToEffect(e) return c:IsAbleToDeck() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c101010057.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c101010057.filter3(c) function c101010057.filter2(c,e,tp,m,chkf)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck() return c:IsType(TYPE_FUSION) and c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:CheckFusionMaterial(m,nil,chkf)
end end
function c101010057.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101010057.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101010057.filter0,nil) local mg=Duel.GetMatchingGroup(c101010057.filter1,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local mg2=Duel.GetMatchingGroup(c101010057.filter3,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil) return Duel.IsExistingMatchingCard(c101010057.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,chkf)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c101010057.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101010057.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
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)
end end
function c101010057.cffilter(c)
return c:IsLocation(LOCATION_HAND) or (c:IsLocation(LOCATION_MZONE) and c:IsFacedown())
end
function c101010057.activate(e,tp,eg,ep,ev,re,r,rp) function c101010057.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c101010057.filter1,nil,e) local mg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c101010057.filter1),tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_MZONE,0,nil,e)
local mg2=Duel.GetMatchingGroup(c101010057.filter3,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,nil) local sg=Duel.GetMatchingGroup(c101010057.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,chkf)
mg1:Merge(mg2) if sg:GetCount()>0 then
local sg1=Duel.GetMatchingGroup(c101010057.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101010057.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst() local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf) local cf=mat:Filter(c101010057.cffilter,nil)
tc:SetMaterial(mat1) if cf:GetCount()>0 then
Duel.SendtoDeck(mat1,nil,2,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION) Duel.ConfirmCards(1-tp,cf)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end end
tc:CompleteProcedure() Duel.SendtoDeck(mat,nil,2,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
end end
end end
...@@ -59,7 +59,7 @@ function c101010058.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c101010058.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101010058.filter),tp,LOCATION_DECK,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101010058.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end end
......
...@@ -62,6 +62,7 @@ end ...@@ -62,6 +62,7 @@ end
function c101010064.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010064.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetCounter(0x52) local ct=e:GetHandler():GetCounter(0x52)
if chk==0 then return ct>0 end if chk==0 then return ct>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ct*500)
end end
...@@ -76,6 +77,7 @@ end ...@@ -76,6 +77,7 @@ end
function c101010064.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101010064.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetHandler():GetCounter(0x52) local ct=e:GetHandler():GetCounter(0x52)
if chk==0 then return ct>0 end if chk==0 then return ct>0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*300)
end end
......
...@@ -39,8 +39,8 @@ end ...@@ -39,8 +39,8 @@ end
function c101010072.filter(c) function c101010072.filter(c)
return c:IsFaceup() and c:IsSetCard(0x19) return c:IsFaceup() and c:IsSetCard(0x19)
end end
function c101010072.macon(e,tp,eg,ep,ev,re,r,rp) function c101010072.macon(e)
return Duel.IsExistingMatchingCard(c101010072.filter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c101010072.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end end
function c101010072.cfilter(c) function c101010072.cfilter(c)
return c:IsSetCard(0x19) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() return c:IsSetCard(0x19) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
...@@ -49,13 +49,17 @@ function c101010072.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -49,13 +49,17 @@ function c101010072.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101010072.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101010072.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101010072.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101010072.cfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil)
local cf=g:Filter(Card.IsFacedown,nil)
if cf:GetCount()>0 then
Duel.ConfirmCards(1-tp,cf)
end
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function c101010072.atkfilter(c) function c101010072.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x19) and c:GetBaseDefense()>0 return c:IsFaceup() and c:IsSetCard(0x19) and c:GetBaseDefense()>0
end end
function c101010072.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101010072.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101010072.atkfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101010072.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101010072.atkfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101010072.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101010072.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101010072.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
......
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