Commit 0069153f authored by mercury233's avatar mercury233

fix

parent f0b1157c
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
!counter 0x163 指示物(推荐捏军贯) !counter 0x163 指示物(推荐捏军贯)
!setname 0x1162 大钢琴之七音服 グランドレミコード !setname 0x1162 大钢琴之七音服 グランドレミコード
!setname 0x28f 防火 ファイアウォール !setname 0x28f 防火 ファイアウォール
!setname 0x290 Gold Pride !setname 0x290 黄金荣耀 Gold Pride
!setname 0x291 末那愚子族 マナドゥム !setname 0x291 末那愚子族 マナドゥム
!setname 0x292 妮穆蕾莉娅 ネムレリア !setname 0x292 妮穆蕾莉娅 ネムレリア
!setname 0x293 新式魔厨 ヌーベルズ
!setname 0x294 食谱 レシピ
...@@ -4,24 +4,25 @@ function c101112030.initial_effect(c) ...@@ -4,24 +4,25 @@ function c101112030.initial_effect(c)
--pendulum summon --pendulum summon
aux.EnablePendulumAttribute(c) aux.EnablePendulumAttribute(c)
--extra to hand --extra to hand
local e0=Effect.CreateEffect(c)
e0:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_PZONE)
e0:SetCountLimit(1,101112030)
e0:SetTarget(c101112030.thtg1)
e0:SetOperation(c101112030.thop1)
c:RegisterEffect(e0)
--to hand 2
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101112030,0)) e1:SetDescription(aux.Stringid(101112030,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101112030+100) e1:SetCountLimit(1,101112030)
e1:SetTarget(c101112030.thtg2) e1:SetTarget(c101112030.thtg1)
e1:SetOperation(c101112030.thop2) e1:SetOperation(c101112030.thop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--to hand 2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101112030,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101112030+100)
e2:SetTarget(c101112030.thtg2)
e2:SetOperation(c101112030.thop2)
c:RegisterEffect(e2)
if not c101112030.global_check then if not c101112030.global_check then
c101112030.global_check=true c101112030.global_check=true
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
...@@ -37,8 +38,7 @@ function c101112030.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,8 +38,7 @@ function c101112030.checkop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101112030.thfilter1(c) function c101112030.thfilter1(c)
if c:IsFacedown() or not c:IsType(TYPE_PENDULUM) then return false end return c:IsFaceup() and c:IsType(TYPE_PENDULUM) and c:IsSetCard(0xf2) and c:IsAbleToHand()
return c:IsSetCard(0xf2) and c:IsAbleToHand()
end end
function c101112030.thtg1(e,tp,eg,ep,ev,re,r,rp,chk) function c101112030.thtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101112030.thfilter1,tp,LOCATION_EXTRA,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101112030.thfilter1,tp,LOCATION_EXTRA,0,1,nil) end
...@@ -66,30 +66,32 @@ end ...@@ -66,30 +66,32 @@ end
function c101112030.thtg2(e,tp,eg,ep,ev,re,r,rp,chk) function c101112030.thtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local lc=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local lc=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,1) local rc=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not lc or not sc then return false end if not lc or not rc then return false end
local lsc=lc:GetLeftScale() local lsc=lc:GetLeftScale()
local rsc=sc:GetRightScale() local rsc=rc:GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end if lsc>rsc then lsc,rsc=rsc,lsc end
return Duel.IsExistingMatchingCard(c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,nil,lsc,rsc) return Duel.IsExistingMatchingCard(c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,nil,lsc,rsc)
end end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_EXTRA)
end end
function c101112030.thop2(e,tp,eg,ep,ev,re,r,rp) function c101112030.thop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local lc=Duel.GetFieldCard(tp,LOCATION_PZONE,0) local lc=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
local sc=Duel.GetFieldCard(tp,LOCATION_PZONE,1) local rc=Duel.GetFieldCard(tp,LOCATION_PZONE,1)
if not lc or not sc then return end if lc and rc then
local lsc=lc:GetLeftScale() local lsc=lc:GetLeftScale()
local rsc=sc:GetRightScale() local rsc=rc:GetRightScale()
if lsc>rsc then lsc,rsc=rsc,lsc end if lsc>rsc then lsc,rsc=rsc,lsc end
if lc and sc and Duel.IsExistingMatchingCard(c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,nil,lsc,rsc) then if Duel.IsExistingMatchingCard(c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,nil,lsc,rsc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,2,nil,lsc,rsc) local g=Duel.SelectMatchingCard(tp,c101112030.thfilter2,tp,LOCATION_EXTRA,0,1,2,nil,lsc,rsc)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end
end end
Duel.ResetFlagEffect(tp,101112030) Duel.ResetFlagEffect(tp,101112030)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
...@@ -98,14 +100,14 @@ function c101112030.thop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -98,14 +100,14 @@ function c101112030.thop2(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c101112030.actlimit) e1:SetValue(c101112030.actlimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE) e2:SetCode(EFFECT_DISABLE)
e2:SetTargetRange(LOCATION_PZONE,0) e2:SetTargetRange(LOCATION_PZONE,0)
e2:SetCondition(c101112030.discon) e2:SetCondition(c101112030.discon)
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING) e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetCondition(c101112030.discon) e3:SetCondition(c101112030.discon)
......
...@@ -33,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -33,7 +33,7 @@ function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<ct then return end
Duel.ConfirmDecktop(tp,ct) Duel.ConfirmDecktop(tp,ct)
local g=Duel.GetDecktopGroup(tp,ct) local g=Duel.GetDecktopGroup(tp,ct)
if #g>0 and g:FilterCount(s.filter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then if g:FilterCount(s.filter,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
Duel.DisableShuffleCheck() Duel.DisableShuffleCheck()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:FilterSelect(tp,s.filter,1,1,nil) local sg=g:FilterSelect(tp,s.filter,1,1,nil)
......
...@@ -19,10 +19,11 @@ function s.initial_effect(c) ...@@ -19,10 +19,11 @@ function s.initial_effect(c)
e2:SetDescription(aux.Stringid(id,1)) e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.rmtg) e2:SetTarget(s.rmtg)
e2:SetOperation(s.rmop) e2:SetOperation(s.rmop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -32,21 +33,23 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,21 +33,23 @@ function s.condition(e,tp,eg,ep,ev,re,r,rp)
return rc:IsOnField() and rc:IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and not rc:IsCode(id) return rc:IsOnField() and rc:IsRelateToEffect(re) and re:IsActiveType(TYPE_MONSTER) and not rc:IsCode(id)
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return re:GetHandler():IsCanAddCounter(0x1162,1) if chk==0 then return re:GetHandler():IsCanAddCounter(0x1162,1)
and not e:GetHandler():IsStatus(STATUS_CHAINING) end and c:GetFlagEffect(id)==0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
c:RegisterFlagEffect(id,RESET_CHAIN,0,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1162) Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1162)
end end
function s.operation(e,tp,eg,ep,ev,re,r,rp) function s.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
if rc:IsFaceup() and rc:IsRelateToEffect(re) then if rc:IsFaceup() and rc:IsRelateToEffect(re) and rc:AddCounter(0x1162,1) then
rc:AddCounter(0x1162,1) local e1=Effect.CreateEffect(e:GetHandler())
local e2=Effect.CreateEffect(e:GetHandler()) e1:SetType(EFFECT_TYPE_SINGLE)
e2:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e1:SetCondition(s.indes)
e2:SetCondition(s.indes) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetValue(1)
e2:SetValue(1) rc:RegisterEffect(e1)
rc:RegisterEffect(e2)
end end
end end
function s.indes(e) function s.indes(e)
...@@ -56,16 +59,19 @@ function s.filter(c) ...@@ -56,16 +59,19 @@ function s.filter(c)
return c:GetCounter(0x1162)>0 and c:IsAbleToRemove() return c:GetCounter(0x1162)>0 and c:IsAbleToRemove()
end end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) and chkc~=c end
if chk==0 then return c:IsAbleToRemove()
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,c) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g+e:GetHandler(),2,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g+c,2,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 c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc or not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) or c:IsFacedown() then return end if not tc:IsRelateToEffect(e) or not c:IsRelateToEffect(e) then return end
local g=Group.FromCards(c,tc) local g=Group.FromCards(c,tc)
if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then if Duel.Remove(g,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local fid=c:GetFieldID() local fid=c:GetFieldID()
......
...@@ -106,10 +106,8 @@ function c101112035.spittg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -106,10 +106,8 @@ function c101112035.spittg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101112035.spitop(e,tp,eg,ep,ev,re,r,rp) function c101112035.spitop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local rg=Duel.GetMatchingGroup(c101112035.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,e,tp) local rg=Duel.GetMatchingGroup(c101112035.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if not c:IsRelateToEffect(e) or #rg<4 then return end if #rg==4 and Duel.Release(rg,REASON_EFFECT)==4 and c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
local g=rg:Select(tp,4,4,nil) end
if Duel.Release(g,REASON_EFFECT)~=4 then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -76,9 +76,7 @@ function c101112037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -76,9 +76,7 @@ function c101112037.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c101112037.spop(e,tp,eg,ep,ev,re,r,rp) function c101112037.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -31,49 +31,42 @@ function c101112038.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,49 +31,42 @@ function c101112038.regop(e,tp,eg,ep,ev,re,r,rp)
local g=c:GetMaterial() local g=c:GetMaterial()
if #g==0 then return end if #g==0 then return end
if g:IsExists(Card.IsType,1,nil,TYPE_EFFECT) then if g:IsExists(Card.IsType,1,nil,TYPE_EFFECT) then
c:RegisterFlagEffect(85360035,RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD,0,1) c:RegisterFlagEffect(85360035,RESET_EVENT+RESETS_STANDARD,0,1)
end end
local chk1=0
local chk2=0
if g:IsExists(Card.IsOriginalCodeRule,1,nil,33026283) then if g:IsExists(Card.IsOriginalCodeRule,1,nil,33026283) then
chk1=1 --atk down
c:RegisterFlagEffect(101112038,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,0)) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetCondition(c101112038.atkcon)
e1:SetTarget(c101112038.atktg)
e1:SetValue(3000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,0))
end end
if g:IsExists(Card.IsOriginalCodeRule,1,nil,284224) then if g:IsExists(Card.IsOriginalCodeRule,1,nil,284224) then
chk2=1 --remove
c:RegisterFlagEffect(101112038,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,1)) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101112038,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetCondition(c101112038.rmcon)
e2:SetTarget(c101112038.rmtg)
e2:SetOperation(c101112038.rmop)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,1))
end end
--atk down
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(c101112038.atkcon)
e1:SetTarget(c101112038.atktg)
e1:SetValue(3000)
e1:SetLabel(chk1)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101112038,2))
e2:SetCategory(CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCountLimit(1)
e2:SetCondition(c101112038.rmcon)
e2:SetTarget(c101112038.rmtg)
e2:SetOperation(c101112038.rmop)
e2:SetLabel(chk2)
c:RegisterEffect(e2)
end end
function c101112038.atkcon(e) function c101112038.atkcon(e)
if e:GetLabel()~=1 then return false end
local tp=e:GetHandlerPlayer() local tp=e:GetHandlerPlayer()
local a=Duel.GetBattleMonster(tp) local a=Duel.GetBattleMonster(tp)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and a and a:IsSetCard(0x14f) return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and a and a:IsSetCard(0x14f)
...@@ -84,7 +77,6 @@ function c101112038.atktg(e,c) ...@@ -84,7 +77,6 @@ function c101112038.atktg(e,c)
return c==a return c==a
end end
function c101112038.rmcon(e) function c101112038.rmcon(e)
if e:GetLabel()~=1 then return false end
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer() return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end end
function c101112038.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112038.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -138,8 +130,8 @@ function c101112038.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,8 +130,8 @@ function c101112038.spop(e,tp,eg,ep,ev,re,r,rp)
e2:SetValue(1) e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
tc:RegisterFlagEffect(101112038,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,3)) tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112038,3))
end end
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
end end
\ No newline at end of file
...@@ -48,6 +48,7 @@ function c101112039.reptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,6 +48,7 @@ function c101112039.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESREPLACE)
local xg=tg:Select(tp,1,1,nil) local xg=tg:Select(tp,1,1,nil)
Duel.SetTargetCard(xg) Duel.SetTargetCard(xg)
xg:GetFirst():SetStatus(STATUS_DESTROY_CONFIRMED,true)
return true return true
else return false end else return false end
end end
...@@ -57,18 +58,17 @@ end ...@@ -57,18 +58,17 @@ end
function c101112039.repop(e,tp,eg,ep,ev,re,r,rp) function c101112039.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101112039) Duel.Hint(HINT_CARD,0,101112039)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
tc:SetStatus(STATUS_DESTROY_CONFIRMED,false)
Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE) Duel.Destroy(tc,REASON_EFFECT+REASON_REPLACE)
end end
function c101112039.drcon(e,tp,eg,ep,ev,re,r,rp) function c101112039.drcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) return rp==1-tp and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c101112039.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101112039.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
return h<3 and Duel.IsPlayerCanDraw(tp,3-h)
end
local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local h=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if chk==0 then return h<3 and Duel.IsPlayerCanDraw(tp,3-h) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3-h)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3-h) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3-h)
end end
function c101112039.drop(e,tp,eg,ep,ev,re,r,rp) function c101112039.drop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -9,6 +9,7 @@ function c101112040.initial_effect(c) ...@@ -9,6 +9,7 @@ function c101112040.initial_effect(c)
--spsummon (self) --spsummon (self)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101112040,0)) e1:SetDescription(aux.Stringid(101112040,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_PZONE) e1:SetRange(LOCATION_PZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
...@@ -25,7 +26,7 @@ function c101112040.initial_effect(c) ...@@ -25,7 +26,7 @@ function c101112040.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101112040,2)) e3:SetDescription(aux.Stringid(101112040,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
...@@ -48,9 +49,6 @@ function c101112040.spdtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -48,9 +49,6 @@ function c101112040.spdtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) then if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) then
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0)
e:SetCategory(CATEGORY_SPECIAL_SUMMON+EFFECT_DISABLE+CATEGORY_ATKCHANGE)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
end end
end end
function c101112040.spdop(e,tp,eg,ep,ev,re,r,rp) function c101112040.spdop(e,tp,eg,ep,ev,re,r,rp)
...@@ -61,6 +59,7 @@ function c101112040.spdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,6 +59,7 @@ function c101112040.spdop(e,tp,eg,ep,ev,re,r,rp)
and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP) and not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
and tc:IsControler(1-tp) and tc:IsFaceup() and tc:IsControler(1-tp) and tc:IsFaceup()
and (tc:GetAttack()>0 or aux.NegateMonsterFilter(tc)) then and (tc:GetAttack()>0 or aux.NegateMonsterFilter(tc)) then
Duel.BreakEffect()
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -106,7 +105,7 @@ function c101112040.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -106,7 +105,7 @@ function c101112040.spop(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0 if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)>0
and c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) and c:IsRelateToEffect(e) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1))
and Duel.SelectYesNo(tp,aux.Stringid(101112040,1)) then and Duel.SelectYesNo(tp,aux.Stringid(101112040,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true) Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end end
......
...@@ -30,7 +30,7 @@ function c101112041.initial_effect(c) ...@@ -30,7 +30,7 @@ function c101112041.initial_effect(c)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101112041,1)) e3:SetDescription(aux.Stringid(101112041,1))
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_DESTROY)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -42,7 +42,7 @@ function c101112041.initial_effect(c) ...@@ -42,7 +42,7 @@ function c101112041.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101112041.spfilter(c,e,tp) function c101112041.spfilter(c,e,tp)
return (c:IsAttribute(ATTRIBUTE_DARK) or c:IsAttribute(ATTRIBUTE_LIGHT)) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end end
function c101112041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c101112041.spfilter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and c101112041.spfilter(chkc,e,tp) end
...@@ -53,7 +53,6 @@ function c101112041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -53,7 +53,6 @@ function c101112041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c101112041.spop(e,tp,eg,ep,ev,re,r,rp) function c101112041.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -63,7 +63,7 @@ function c101112042.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -63,7 +63,7 @@ function c101112042.atkop(e,tp,eg,ep,ev,re,r,rp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101112042,2)) then if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101112042,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local tg=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local tg=sg:Select(tp,1,1,nil)
Duel.HintSelection(tg) Duel.HintSelection(tg)
local sc=tg:GetFirst() local sc=tg:GetFirst()
Duel.NegateRelatedChain(sc,RESET_TURN_SET) Duel.NegateRelatedChain(sc,RESET_TURN_SET)
......
...@@ -26,7 +26,7 @@ function s.initial_effect(c) ...@@ -26,7 +26,7 @@ function s.initial_effect(c)
e3:SetDescription(aux.Stringid(id,1)) e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_LEAVE_FIELD) e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(s.spcon) e3:SetCondition(s.spcon)
e3:SetTarget(s.sptg) e3:SetTarget(s.sptg)
...@@ -90,10 +90,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,10 +90,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e,tp)
if ft<=0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
...@@ -36,15 +36,15 @@ function c101112044.matfilter2(c,syncard) ...@@ -36,15 +36,15 @@ function c101112044.matfilter2(c,syncard)
return c:IsNotTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) return c:IsNotTuner(syncard) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
end end
function c101112044.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112044.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end if chkc then return chkc:IsOnField() and chkc:IsAbleToRemove() end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c101112044.rmop(e,tp,eg,ep,ev,re,r,rp) function c101112044.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end end
end end
...@@ -75,17 +75,19 @@ function c101112044.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,17 +75,19 @@ function c101112044.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetValue(c101112044.efilter) e1:SetValue(c101112044.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.AdjustInstantly(c)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112044,0)) c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112044,0))
end end
if bit.band(att,ATTRIBUTE_DARK)~=0 then if bit.band(att,ATTRIBUTE_DARK)~=0 then
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0) e2:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(1) e2:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e2)
Duel.AdjustInstantly(c)
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112044,1)) c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101112044,1))
end end
end end
......
...@@ -44,20 +44,19 @@ function c101112046.efcon2(e) ...@@ -44,20 +44,19 @@ function c101112046.efcon2(e)
end end
function c101112046.immval(e,re) function c101112046.immval(e,re)
local rc=re:GetHandler() local rc=re:GetHandler()
if rc:IsSetCard(0x14e) then return false end return re:IsActivated() and not rc:IsSetCard(0x14e)
return re:IsActivated()
end end
function c101112046.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c101112046.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c101112046.filter1(c,tp) function c101112046.filter1(c,tp)
local dischk=c:IsType(TYPE_EFFECT) and aux.NegateEffectMonsterFilter(c) return c:IsType(TYPE_EFFECT) and aux.NegateEffectMonsterFilter(c)
return dischk and Duel.IsExistingTarget(c101112046.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) and Duel.IsExistingTarget(c101112046.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,c)
end end
function c101112046.filter2(c,tc) function c101112046.filter2(c,tc)
if c:IsRace(tc:GetRace()) or c:IsAttribute(tc:GetAttribute()) then return false end
return c:IsType(TYPE_EFFECT) and aux.NegateEffectMonsterFilter(c) return c:IsType(TYPE_EFFECT) and aux.NegateEffectMonsterFilter(c)
and not c:IsRace(tc:GetRace()) and not c:IsAttribute(tc:GetAttribute())
end end
function c101112046.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112046.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -12,8 +12,9 @@ function c101112047.initial_effect(c) ...@@ -12,8 +12,9 @@ function c101112047.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END) e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCountLimit(1,101112047) e1:SetCountLimit(1,101112047)
e1:SetCondition(aux.dscon)
e1:SetTarget(c101112047.thtg) e1:SetTarget(c101112047.thtg)
e1:SetOperation(c101112047.thop) e1:SetOperation(c101112047.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -34,7 +35,7 @@ function c101112047.initial_effect(c) ...@@ -34,7 +35,7 @@ function c101112047.initial_effect(c)
e4:SetDescription(aux.Stringid(101112047,1)) e4:SetDescription(aux.Stringid(101112047,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_CUSTOM+101112047) e4:SetCode(EVENT_CUSTOM+101112047)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101112047+100) e4:SetCountLimit(1,101112047+100)
...@@ -95,7 +96,8 @@ function c101112047.spfilter(c,e,tp) ...@@ -95,7 +96,8 @@ function c101112047.spfilter(c,e,tp)
end end
function c101112047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112047.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101112047.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101112047.spfilter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c101112047.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101112047.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101112047.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c101112047.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -30,7 +30,7 @@ function c101112048.initial_effect(c) ...@@ -30,7 +30,7 @@ function c101112048.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE) e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_ATTACK+TIMING_MAIN_END) e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCountLimit(1,101112048) e3:SetCountLimit(1,101112048)
e3:SetCondition(c101112048.spcon) e3:SetCondition(c101112048.spcon)
e3:SetCost(c101112048.spcost) e3:SetCost(c101112048.spcost)
......
...@@ -53,9 +53,6 @@ function c101112049.spfilter(c,e,tp,zone) ...@@ -53,9 +53,6 @@ function c101112049.spfilter(c,e,tp,zone)
return c:IsSetCard(0x162) and c:GetCurrentScale()%2==1 return c:IsSetCard(0x162) and c:GetCurrentScale()%2==1
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end end
function c101112049.tefilter(c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==0
end
function c101112049.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101112049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp) local zone=e:GetHandler():GetLinkedZone(tp)
...@@ -64,6 +61,9 @@ function c101112049.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,6 +61,9 @@ function c101112049.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_PZONE)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
function c101112049.tefilter(c)
return c:IsSetCard(0x162) and c:IsType(TYPE_PENDULUM) and c:GetCurrentScale()%2==0
end
function c101112049.spop(e,tp,eg,ep,ev,re,r,rp) function c101112049.spop(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp) local zone=e:GetHandler():GetLinkedZone(tp)
local g=Duel.GetMatchingGroup(c101112049.spfilter,tp,LOCATION_PZONE,0,nil,e,tp,zone) local g=Duel.GetMatchingGroup(c101112049.spfilter,tp,LOCATION_PZONE,0,nil,e,tp,zone)
...@@ -73,6 +73,7 @@ function c101112049.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,6 +73,7 @@ function c101112049.spop(e,tp,eg,ep,ev,re,r,rp)
if #sg==0 or Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone)==0 then return end if #sg==0 or Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP,zone)==0 then return end
if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(c101112049.tefilter,tp,LOCATION_DECK,0,1,nil) if Duel.NegateActivation(ev) and Duel.IsExistingMatchingCard(c101112049.tefilter,tp,LOCATION_DECK,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(101112049,0)) then and Duel.SelectYesNo(tp,aux.Stringid(101112049,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101112049,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(101112049,1))
local exg=Duel.SelectMatchingCard(tp,c101112049.tefilter,tp,LOCATION_DECK,0,1,1,nil) local exg=Duel.SelectMatchingCard(tp,c101112049.tefilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoExtraP(exg,nil,REASON_EFFECT) Duel.SendtoExtraP(exg,nil,REASON_EFFECT)
......
...@@ -21,7 +21,7 @@ function c101112050.initial_effect(c) ...@@ -21,7 +21,7 @@ function c101112050.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,101112050) e2:SetCountLimit(1,101112050)
e2:SetCondition(c101112050.tdcon) e2:SetCondition(c101112050.tdcon)
e2:SetTarget(c101112050.tdtg) e2:SetTarget(c101112050.tdtg)
...@@ -49,9 +49,6 @@ end ...@@ -49,9 +49,6 @@ end
function c101112050.tdfilter(c) function c101112050.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0x156) and c:IsAbleToDeck() return c:IsFaceup() and c:IsSetCard(0x156) and c:IsAbleToDeck()
end end
function c101112050.spfilter(c,e,tp)
return c:IsSetCard(0x156) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101112050.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101112050.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101112050.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101112050.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101112050.tdfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101112050.tdfilter,tp,LOCATION_MZONE,0,1,nil) end
...@@ -59,10 +56,13 @@ function c101112050.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,10 +56,13 @@ function c101112050.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,c101112050.tdfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101112050.tdfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end end
function c101112050.spfilter(c,e,tp)
return c:IsSetCard(0x156) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101112050.tdop(e,tp,eg,ep,ev,re,r,rp) function c101112050.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_DECK+LOCATION_EXTRA) then
local ft=Duel.GetMZoneCount(tp,tc) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c101112050.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp) local g=Duel.GetMatchingGroup(c101112050.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
if ft>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101112050,1)) then if ft>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101112050,1)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -26,6 +26,14 @@ end ...@@ -26,6 +26,14 @@ end
function s.condition(e,tp,eg,ep,ev,re,r,rp) function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,1-tp) return eg:IsExists(s.cfilter,1,nil,1-tp)
end end
function s.thfilter(c)
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsAbleToHand()
end
function s.spfilter(c,e,tp)
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk) function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
local l=Duel.GetFlagEffectLabel(tp,id) local l=Duel.GetFlagEffectLabel(tp,id)
local b1=(not l or l&1==0) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) local b1=(not l or l&1==0) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
...@@ -55,23 +63,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,23 +63,17 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
end end
function s.thfilter(c)
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsAbleToHand()
end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
function s.spfilter(c,e,tp)
return (c:IsCode(68468459) or aux.IsCodeListed(c,68468459) and c:IsType(TYPE_MONSTER))
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
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.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,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
...@@ -36,29 +36,27 @@ end ...@@ -36,29 +36,27 @@ end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp) return eg:IsExists(s.cfilter,1,nil,tp)
end end
function s.rmfilter(c) function s.rmfilter(c,e,tp)
return c:IsCode(56099748) and c:IsAbleToRemove() return c:IsCode(56099748) and c:IsAbleToRemove()
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,c)
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp,rc)
return c:IsCode(101112036) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 return c:IsCode(101112036) and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.GetLocationCountFromEx(tp,tp,rc,c)>0
end end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,nil) if chk==0 then return Duel.IsExistingMatchingCard(s.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,nil,e,tp) end
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
if chk==0 then return #rg>0 and #sg>0 end Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,rg,1,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)
local rg=Duel.GetMatchingGroup(s.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,nil)
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if #rg==0 or #sg==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg1=rg:Select(tp,1,1,nil) local rg=Duel.SelectMatchingCard(tp,s.rmfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD,0,1,1,nil,e,tp)
if #rg1>0 and Duel.Remove(rg1,POS_FACEUP,REASON_EFFECT)>0 then if #rg>0 and Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=sg:Select(tp,1,1,nil) local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,nil)
Duel.SpecialSummon(sg1,0,tp,tp,true,false,POS_FACEUP) if #sg>0 then
Duel.SpecialSummon(sg,0,tp,tp,true,false,POS_FACEUP)
end
end end
end end
function s.thfilter(c) function s.thfilter(c)
......
...@@ -29,8 +29,8 @@ function s.initial_effect(c) ...@@ -29,8 +29,8 @@ function s.initial_effect(c)
end end
function s.cfilter(c) function s.cfilter(c)
local b1=c:IsCode(56099748) local b1=c:IsCode(56099748)
local b2=c:IsSetCard(0x291) local b2=c:IsSetCard(0x291) and c:IsType(TYPE_MONSTER)
return not c:IsPublic() and c:IsType(TYPE_MONSTER) and (b1 or b2) return not c:IsPublic() and (b1 or b2)
end end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk) function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -27,27 +27,25 @@ end ...@@ -27,27 +27,25 @@ end
function s.filter1(c) function s.filter1(c)
return c:IsFaceup() and c:IsCode(101112058) return c:IsFaceup() and c:IsCode(101112058)
end end
function s.filter2(c,tp,check)
return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,check)
end
function s.thfilter(c,check) function s.thfilter(c,check)
local b1=c:IsCode(101112058) local b1=c:IsCode(101112058)
local b2=check and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x291) local b2=check and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x291)
return not c:IsCode(m) and (b1 or b2) and c:IsAbleToHand() return not c:IsCode(id) and (b1 or b2) and c:IsAbleToHand()
end end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
local check=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil) local check=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter2(chkc,tp,check) end if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return Duel.IsExistingTarget(s.filter2,tp,LOCATION_MZONE,0,1,nil,tp,check) end and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,check) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter2,tp,LOCATION_MZONE,0,1,1,nil,tp,check) local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,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 s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local check=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.Destroy(tc,REASON_EFFECT)==0 then return end if not tc:IsRelateToEffect(e) or Duel.Destroy(tc,REASON_EFFECT)==0 then return end
local check=Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_ONFIELD,0,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,check) local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,check)
if #g==0 then return end if #g==0 then return end
...@@ -65,10 +63,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -65,10 +63,10 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if ft<=0 or #g==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP) if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end end
\ No newline at end of file
...@@ -35,9 +35,9 @@ function s.initial_effect(c) ...@@ -35,9 +35,9 @@ function s.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function s.filter(c) function s.filter(c)
local b1=c:IsSetCard(0x291) local b1=c:IsSetCard(0x291) and c:IsType(TYPE_MONSTER)
local b2=c:IsCode(56099748) local b2=c:IsCode(56099748)
return (b1 or b2) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (b1 or b2) and c:IsAbleToHand()
end end
function s.activate(e,tp,eg,ep,ev,re,r,rp) function s.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(s.filter,tp,LOCATION_DECK,0,nil)
...@@ -48,12 +48,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,12 +48,12 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
end end
end end
function s.ckfilter(c)
return c:IsType(TYPE_TUNER) and c:IsFaceupEx()
end
function s.atktg(e,c) function s.atktg(e,c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT)
end end
function s.ckfilter(c)
return c:IsType(TYPE_TUNER) and c:IsFaceupEx()
end
function s.atkval(e,c) function s.atkval(e,c)
local ct=Duel.GetMatchingGroupCount(s.ckfilter,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,nil) local ct=Duel.GetMatchingGroupCount(s.ckfilter,e:GetHandlerPlayer(),LOCATION_MZONE+LOCATION_GRAVE,0,nil)
return ct*100 return ct*100
...@@ -83,6 +83,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -83,6 +83,6 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then return end if not tc:IsRelateToEffect(e) then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
...@@ -40,11 +40,11 @@ function c101112059.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -40,11 +40,11 @@ function c101112059.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return #g>=2 and check end if chk==0 then return #g>=2 and check end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c101112059.splimit) e1:SetTarget(c101112059.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,2,2,nil) local rg=g:Select(tp,2,2,nil)
...@@ -62,14 +62,6 @@ function c101112059.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,14 +62,6 @@ function c101112059.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,2,tp,LOCATION_DECK)
end end
function c101112059.activate(e,tp,eg,ep,ev,re,r,rp) function c101112059.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c101112059.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local g=Duel.GetMatchingGroup(c101112059.filter,tp,LOCATION_DECK,0,nil) local g=Duel.GetMatchingGroup(c101112059.filter,tp,LOCATION_DECK,0,nil)
if g:GetClassCount(Card.GetCode)<2 then return end if g:GetClassCount(Card.GetCode)<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
...@@ -81,7 +73,7 @@ end ...@@ -81,7 +73,7 @@ end
function c101112059.splimit(e,c) function c101112059.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_PENDULUM) return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_PENDULUM)
end end
function c101112059.rmfilter(c) function c101112059.reprmfilter(c,tp)
return c:IsFacedown() and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT) return c:IsFacedown() and c:IsAbleToRemove(tp,POS_FACEDOWN,REASON_EFFECT)
end end
function c101112059.repcon(e) function c101112059.repcon(e)
...@@ -95,7 +87,7 @@ function c101112059.repfilter(c,tp) ...@@ -95,7 +87,7 @@ function c101112059.repfilter(c,tp)
end end
function c101112059.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c101112059.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c101112059.repfilter,1,nil,tp) if chk==0 then return eg:IsExists(c101112059.repfilter,1,nil,tp)
and Duel.IsExistingMatchingCard(c101112059.rmfilter,tp,LOCATION_EXTRA,0,1,nil) end and Duel.IsExistingMatchingCard(c101112059.reprmfilter,tp,LOCATION_EXTRA,0,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end end
function c101112059.repval(e,c) function c101112059.repval(e,c)
...@@ -103,8 +95,7 @@ function c101112059.repval(e,c) ...@@ -103,8 +95,7 @@ function c101112059.repval(e,c)
end end
function c101112059.repop(e,tp,eg,ep,ev,re,r,rp) function c101112059.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101112059) Duel.Hint(HINT_CARD,0,101112059)
local g=Duel.GetMatchingGroup(c101112059.rmfilter,tp,LOCATION_EXTRA,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=g:Select(tp,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101112059.reprmfilter,tp,LOCATION_EXTRA,0,1,1,nil,tp)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE) Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT+REASON_REPLACE)
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment