Commit 721a0296 authored by Tang Xinwei's avatar Tang Xinwei
parents d0b8414f d8fa1e2c
--灵摆女巫 --coded by Lyris
local cm,m,o=GetID() --Pendulum Witch
function cm.initial_effect(c) local s, id, o = GetID()
--pendulum summon function s.initial_effect(c)
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--Destroy P --to extra
aux.RegisterMergedDelayedEvent(c,id,EVENT_DESTROYED)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_TOHAND+CATEGORY_SEARCH) e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_CUSTOM+id)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,m) e1:SetCountLimit(1,id)
e1:SetTarget(cm.destg) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetOperation(cm.desop) e1:SetCondition(s.txcon)
e1:SetTarget(s.txtg)
e1:SetOperation(s.txop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e4=e1:Clone() --search
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetCondition(cm.condition)
c:RegisterEffect(e4)
--pendulum
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DESTROYED) e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY) e2:SetCountLimit(1,id+o)
e2:SetCondition(cm.pencon) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetTarget(cm.pentg) e2:SetTarget(s.thtg)
e2:SetOperation(cm.penop) e2:SetOperation(s.thop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--to EX local e3=e2:Clone()
local e3=Effect.CreateEffect(c) e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCategory(CATEGORY_TOEXTRA) e3:SetCondition(s.thcon)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetRange(LOCATION_PZONE)
e3:SetCountLimit(1,m+o)
e3:SetCondition(cm.tecon)
e3:SetTarget(cm.tetg)
e3:SetOperation(cm.teop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--to scale
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,2))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_DESTROYED)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.pzcon)
e4:SetTarget(s.pztg)
e4:SetOperation(s.pzop)
c:RegisterEffect(e4)
end
function s.cfilter(c,tp,chk)
return c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousTypeOnField()&(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ)>0
and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and (c:IsReason(REASON_BATTLE)
or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp)
and (not chk or Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,c))
end
function s.chk(c,tc)
return c:GetOriginalRace()==tc:GetOriginalRace()
end
function s.filter(c,r)
if not c:IsType(TYPE_PENDULUM) then return false end
local t=type(r)
if t=='userdata' then
local v=aux.GetValueType(r)
if v=='Card' then return s.chk(c,r)
elseif v=='Group' then return r:IsExists(s.chk,1,c,c)
else return false end
elseif t=='number' then return c:GetOriginalRace()==r
else return false end
end
function s.txcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.txtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(s.cfilter,nil,tp,chk==0)
if chk==0 then return #g>0 end
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,nil,1,tp,LOCATION_DECK)
end end
function cm.desfilter(c) function s.txop(e,tp,eg,ep,ev,re,r,rp)
return c:IsType(TYPE_PENDULUM) and c:IsFaceup() local g=Duel.GetTargetsRelateToChain()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(id,3))
local tg=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,1,1,nil,g)
Duel.SendtoExtraP(tg,nil,REASON_EFFECT)
end end
function cm.thfilter(c) function s.sfilter(c)
return c:IsLevelBelow(4) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand() return c:IsLevelBelow(4) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_PZONE) and cm.desfilter(chkc) and chkc~=e:GetHandler() end if chkc then return chkc:IsLocation(LOCATION_PZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(cm.desfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,e:GetHandler()) if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_PZONE,0,1,nil)
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end and Duel.IsExistingMatchingCard(s.sfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,cm.desfilter,tp,LOCATION_PZONE,LOCATION_PZONE,1,1,e:GetHandler()) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_PZONE,0,1,1,nil)+e:GetHandler()
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and e:GetHandler():IsRelateToEffect(e) and Duel.Destroy(Group.FromCards(tc,e:GetHandler()),REASON_EFFECT)==2 then local g=Group.FromCards(c,tc):Filter(Card.IsRelateToChain,nil)
if #g<2 or Duel.Destroy(g,REASON_EFFECT)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.ConfirmCards(1-tp,sg)
Duel.ConfirmCards(1-tp,g)
end
end
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM) return e:GetHandler():IsSummonType(SUMMON_TYPE_PENDULUM)
end end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp) function s.pzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup() return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceupEx()
end end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk) function s.pztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end end
function cm.penop(e,tp,eg,ep,ev,re,r,rp) function s.pzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) then if c:IsRelateToChain() then Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) end
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
function cm.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsType(TYPE_XYZ+TYPE_SYNCHRO+TYPE_FUSION) and c:IsReason(REASON_DESTROY)
and (c:IsReason(REASON_BATTLE) or c:GetReasonPlayer()==1-tp)
end
function cm.tefilter(c,race)
return c:IsType(TYPE_PENDULUM) and c:GetOriginalRace()&race~=0
end
function cm.tecon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,tp)
end
function cm.tetg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=eg:Filter(cm.cfilter,nil,tp)
local tc=g:GetFirst()
local sg=Group.CreateGroup()
while tc do
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace())
sg:Merge(rg)
tc=g:GetNext()
end
if chk==0 then return sg:GetCount()>0 end
end
function cm.teop(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(cm.cfilter,nil,tp)
local tc=g:GetFirst()
local sg=Group.CreateGroup()
while tc do
local rg=Duel.GetMatchingGroup(cm.tefilter,tp,LOCATION_DECK,0,nil,tc:GetOriginalRace())
sg:Merge(rg)
tc=g:GetNext()
end
if sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,0))
local exg=sg:Select(tp,1,1,nil)
Duel.SendtoExtraP(exg,nil,REASON_EFFECT)
end
end end
\ No newline at end of file
...@@ -45,11 +45,10 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -45,11 +45,10 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function s.filter(c,e,tp) function s.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsFaceup() and c:IsSetCard(0xb5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
and Duel.IsExistingTarget(s.filter2,tp,LOCATION_REMOVED,0,1,c,e,tp)
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end if chk==0 then return Duel.GetMZoneCount(tp,e:GetHandler())>0 and Duel.IsExistingTarget(s.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp) local tc=Duel.SelectTarget(tp,s.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tc,1,0,0)
......
...@@ -14,6 +14,7 @@ function s.initial_effect(c) ...@@ -14,6 +14,7 @@ function s.initial_effect(c)
e2:SetCode(EFFECT_SPSUMMON_PROC) e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE) e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(s.spcon) e2:SetCondition(s.spcon)
e2:SetOperation(s.spop) e2:SetOperation(s.spop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -39,7 +40,7 @@ function s.initial_effect(c) ...@@ -39,7 +40,7 @@ function s.initial_effect(c)
end end
s.lvup={57116033,id} s.lvup={57116033,id}
function s.spfilter(c) function s.spfilter(c)
return (c:IsCode(57116033) or c:IsSetCard(0x3008)) and c:IsFaceupEx() and c:IsAbleToRemoveAsCost() return (c:IsCode(57116033) or c:IsSetCard(0x3008) and c:IsType(TYPE_FUSION)) and c:IsFaceupEx() and c:IsAbleToRemoveAsCost()
end end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
...@@ -72,7 +73,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +73,7 @@ function s.desop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.descon2(e,tp,eg,ep,ev,re,r,rp) function s.descon2(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) return rp~=tp and re:GetHandler():IsOnField() and re:GetHandler():IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER)
end end
function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end if chk==0 then return re:GetHandler():IsDestructable() end
......
...@@ -60,9 +60,7 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,9 +60,7 @@ function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_ONFIELD,0,1,nil) local check=Duel.IsExistingMatchingCard(s.checkfilter,tp,LOCATION_ONFIELD,0,1,nil)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,check) return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,check)
end end
if check then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
else Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
end end
function s.spop1(e,tp,eg,ep,ev,re,r,rp) function s.spop1(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
......
...@@ -84,10 +84,10 @@ function s.splimit(e,c) ...@@ -84,10 +84,10 @@ function s.splimit(e,c)
return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_MACHINE) and c:IsLocation(LOCATION_EXTRA)
end end
function s.thfilter(c,e,tp) function s.thfilter(c,e,tp)
return c:IsCode(37351133) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) return c:IsCode(37351133) and (c:IsAbleToHand() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and c:IsFaceupEx()
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
......
--越龙武士 谦 --Ken the Warrior Dragon
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--to hand --to hand
......
--斐钻之虎 玄 --Gen the Diamond Tiger
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--to hand --to hand
......
--勤劳的山螳螂 --Asset Mountis
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--special summon --special summon
...@@ -37,7 +37,7 @@ function s.spfilter(c) ...@@ -37,7 +37,7 @@ function s.spfilter(c)
end end
function s.spcon(e,c) function s.spcon(e,c)
if c==nil then return true end if c==nil then return true end
return Duel.IsExistingMatchingCard(s.spfilter,tp,0,LOCATION_MZONE,1,nil) return Duel.IsExistingMatchingCard(s.spfilter,c:GetControler(),0,LOCATION_MZONE,1,nil)
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsCanChangePosition() return c:IsFaceup() and c:IsCanChangePosition()
......
--维修区骑士 菲莉 --Pitknight Filly
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
......
--电气念力斗技传承者 --Wattsychic Fighting Porter
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate --Activate
......
--Déchu de Tistina --Fallen of the Tistina
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--Revenant de Tistina --Returned of the Tistina
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--Jeu De Tistina --Play of the Tistina
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--Étreinte de Tistina --Embrace of the Tistina
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--Dissonance de Tistina --Discordance of the Tistina
--Coded by Lee --Coded by Lee
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--急袭猛禽-漆黑伯劳 --RR-ノワール・レイニアス
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--急袭猛禽-繁盛秃鹫 --RR-ブルーム・ヴァルチャー
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
...@@ -91,13 +91,14 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -91,13 +91,14 @@ function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g2,1,0,0)
end end
function s.rmop(e,tp,eg,ep,ev,re,r,rp) function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local ex1,tg1=Duel.GetOperationInfo(0,CATEGORY_REMOVE) local res1,tg1=Duel.GetOperationInfo(0,CATEGORY_REMOVE)
local ex2,tg2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON) local res2,tg2=Duel.GetOperationInfo(0,CATEGORY_SPECIAL_SUMMON)
if tg1:GetFirst():IsRelateToEffect(e) and Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)~=0 then local c,rc,sc=e:GetHandler(),tg1:GetFirst(),tg2:GetFirst()
Duel.Remove(tg1,POS_FACEUP,REASON_EFFECT) if rc:IsRelateToEffect(e) and rc:IsType(TYPE_MONSTER) and c:IsOnField()
and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)*Duel.Remove(tg1,POS_FACEUP,REASON_EFFECT)>0 then
if sc:IsRelateToEffect(e) and sc:IsRace(RACE_FISH) then
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
end end
if tg2:GetFirst():IsRelateToEffect(e) and tg2:GetFirst():IsRace(RACE_FISH) then
Duel.SpecialSummon(tg2,0,tp,tp,false,false,POS_FACEUP)
end end
end end
--spsummon --spsummon
......
--灯魚 --灯魚
--Scripted by Crescent0v0
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--synchro summon --synchro summon
...@@ -42,14 +41,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -42,14 +41,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,2,0,0)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,101203144,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FISH,ATTRIBUTE_FIRE) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,101203144)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
...@@ -58,6 +49,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,6 +49,14 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetTarget(s.splimit) e1:SetTarget(s.splimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,101203144,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_FISH,ATTRIBUTE_FIRE) then return end
for i=1,2 do
local token=Duel.CreateToken(tp,101203144+i)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
end
Duel.SpecialSummonComplete()
end end
function s.splimit(e,c) function s.splimit(e,c)
return not c:IsRace(RACE_FISH) and c:IsLocation(LOCATION_EXTRA) return not c:IsRace(RACE_FISH) and c:IsLocation(LOCATION_EXTRA)
......
--急袭猛禽-崛起叛逆猎鹰 --RR-ライジング・リベリオン・ファルコン
--lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Xyz Summon --Xyz Summon
...@@ -41,18 +40,26 @@ end ...@@ -41,18 +40,26 @@ end
function s.descon(e,tp,eg,ep,ev,re,r,rp) function s.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ) return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end end
function s.damval1(c)
if c:GetLocation()~=LOCATION_MZONE then return end
return math.max(0,c:GetTextAttack())
end
function s.damval2(c)
if c:GetPreviousLocation()~=LOCATION_MZONE then return end
return math.max(0,c:GetTextAttack())
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk) function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if chk==0 then return #g>0 end if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
local atk=g:Filter(Card.IsType,nil,TYPE_MONSTER):GetSum(Card.GetBaseAttack) local atk=g:GetSum(s.damval1)
if atk>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end if atk>0 then Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0) end
end end
function s.desop(e,tp,eg,ep,ev,re,r,rp) function s.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
if Duel.Destroy(g,REASON_EFFECT)>0 and e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_XYZ):GetClassCount(Card.GetCode)>=3 then if Duel.Destroy(g,REASON_EFFECT)>0 and e:GetHandler():GetOverlayGroup():Filter(Card.IsType,nil,TYPE_XYZ):GetClassCount(Card.GetCode)>=3 then
local dg=Duel.GetOperatedGroup():Filter(Card.IsType,nil,TYPE_MONSTER) local dg=Duel.GetOperatedGroup()
local atk=dg:GetSum(Card.GetBaseAttack) local atk=dg:GetSum(s.damval2)
if atk>0 then if atk>0 then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
...@@ -63,8 +70,10 @@ function s.filter(c) ...@@ -63,8 +70,10 @@ function s.filter(c)
return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ) and not c:IsForbidden() return c:IsSetCard(0xba) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ) and not c:IsForbidden()
end end
function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk) function s.copycost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,3,REASON_COST) end local c=e:GetHandler()
e:GetHandler():RemoveOverlayCard(tp,3,3,REASON_COST) if chk==0 then return c:GetFlagEffect(id)==0 and c:CheckRemoveOverlayCard(tp,3,REASON_COST) end
c:RemoveOverlayCard(tp,3,3,REASON_COST)
c:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk) function s.copytg(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.filter(chkc) end
......
--急袭猛禽-勇气林鸮 --RR-ブレイブ・ストリクス
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--跃升阶魔法-奇袭猛禽之力 --RRUM-レイド・ラプターズ・フォース
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
...@@ -45,6 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,6 +45,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tg) local sg=Duel.SelectMatchingCard(tp,s.filter2,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tg)
local sc=sg:GetFirst() local sc=sg:GetFirst()
if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then if sc and Duel.SpecialSummon(sc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)~=0 then
sc:CompleteProcedure()
for tc in aux.Next(tg) do for tc in aux.Next(tg) do
local mg=tc:GetOverlayGroup() local mg=tc:GetOverlayGroup()
if mg:GetCount()~=0 then if mg:GetCount()~=0 then
......
--急袭猛禽-栖所 --RR-ルースト
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
--急袭猛禽-壮丽之光 --RR-グロリアス・ブライト
--lua by zengsxing --lua by zengsxing
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
......
...@@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.filter(c) function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0xac) and c:IsType(TYPE_MONSTER) return c:IsFaceup() and c:IsSetCard(0xac) and c:IsType(TYPE_MONSTER) and c:IsType(TYPE_XYZ)
end end
function s.discon(e,tp,eg,ep,ev,re,r,rp) function s.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,0,1,nil)
......
--嗤う黒山羊 --嗤う黒山羊
--Scripted by Crescent0v0
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--Activate & sumlimit --Activate & sumlimit
...@@ -48,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +47,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function s.sumlimit(e,c,sump,sumtype,sumpos,targetp) function s.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsCode(e:GetLabel()) and not c:IsLocation(LOCATION_GRAVE) return c:IsOriginalCodeRule(e:GetLabel()) and not c:IsLocation(LOCATION_GRAVE)
end end
function s.alop(e,tp,eg,ep,ev,re,r,rp) function s.alop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -65,5 +64,5 @@ function s.alop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,5 +64,5 @@ function s.alop(e,tp,eg,ep,ev,re,r,rp)
end end
function s.actlimit(e,re,tp) function s.actlimit(e,re,tp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsCode(e:GetLabel()) and (rc:IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE)) return rc:IsOriginalCodeRule(e:GetLabel()) and (rc:IsOnField() or re:IsHasType(EFFECT_TYPE_ACTIVATE))
end end
\ No newline at end of file
...@@ -29,7 +29,7 @@ function s.initial_effect(c) ...@@ -29,7 +29,7 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function s.srfilter(c) function s.srfilter(c)
return c:IsCode(101204051) or (aux.IsCodeListed(c,101204051) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToHand() return (c:IsCode(101204051) or aux.IsCodeListed(c,101204051) and c:IsType(TYPE_SPELL+TYPE_TRAP)) and c:IsAbleToHand()
end end
function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk) function s.srtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.srfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.srfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -65,6 +65,7 @@ function s.dactivate(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,6 +65,7 @@ function s.dactivate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ct1=6-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) local ct2=6-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
......
...@@ -33,7 +33,7 @@ function c58132856.initial_effect(c) ...@@ -33,7 +33,7 @@ function c58132856.initial_effect(c)
e4:SetOperation(c58132856.desop) e4:SetOperation(c58132856.desop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
s.set_as_spell=true c58132856.set_as_spell=true
function c58132856.regop(e,tp,eg,ep,ev,re,r,rp) function c58132856.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN) if c:IsPreviousLocation(LOCATION_SZONE) and c:IsPreviousPosition(POS_FACEDOWN)
......
No preview for this file type
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