Commit 1f5355bd authored by Nemo Ma's avatar Nemo Ma

fix

parent 326f1cc3
...@@ -5,6 +5,7 @@ function c33400303.initial_effect(c) ...@@ -5,6 +5,7 @@ function c33400303.initial_effect(c)
aux.AddLinkProcedure(c,c33400303.matfilter,1,1) aux.AddLinkProcedure(c,c33400303.matfilter,1,1)
--copy effect --copy effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33400303,5))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
......
...@@ -18,6 +18,7 @@ function c33400304.initial_effect(c) ...@@ -18,6 +18,7 @@ function c33400304.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--special summon --special summon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33400304,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON) e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
......
...@@ -5,6 +5,7 @@ function cm.initial_effect(c) ...@@ -5,6 +5,7 @@ function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--destory --destory
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
......
--夜刀神天香 蔑视 --夜刀神天香 蔑视
function c33400311.initial_effect(c) local m=33400311
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,5))
e1:SetCategory(CATEGORY_REMOVE) e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,33400311) e1:SetCountLimit(1,m)
e1:SetCondition(aux.bdcon) e1:SetCondition(aux.bdcon)
e1:SetOperation(c33400311.desop) e1:SetOperation(cm.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- IMMUNE -- IMMUNE
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,33400311+10000) e2:SetCountLimit(1,m+10000)
e2:SetTarget(c33400311.imtg) e2:SetTarget(cm.imtg)
e2:SetOperation(c33400311.imop) e2:SetOperation(cm.imop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
--cannot set --cannot set
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,7 +41,7 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e3,1-tp) Duel.RegisterEffect(e3,1-tp)
local e4=e1:Clone() local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e4:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e4:SetTarget(c33400311.sumlimit) e4:SetTarget(cm.sumlimit)
Duel.RegisterEffect(e4,1-tp) Duel.RegisterEffect(e4,1-tp)
--cannot trigger --cannot trigger
local e5=Effect.CreateEffect(e:GetHandler()) local e5=Effect.CreateEffect(e:GetHandler())
...@@ -46,64 +49,64 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,64 +49,64 @@ function c33400311.desop(e,tp,eg,ep,ev,re,r,rp)
e5:SetCode(EFFECT_CANNOT_TRIGGER) e5:SetCode(EFFECT_CANNOT_TRIGGER)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetTargetRange(LOCATION_SZONE,0) e5:SetTargetRange(LOCATION_SZONE,0)
e5:SetTarget(c33400311.distg) e5:SetTarget(cm.distg)
e5:SetReset(RESET_PHASE+PHASE_END) e5:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e5,1-tp) Duel.RegisterEffect(e5,1-tp)
if Duel.IsExistingMatchingCard(c33400311.refilter1,tp,0,LOCATION_ONFIELD,1,nil) then if Duel.IsExistingMatchingCard(cm.refilter1,tp,0,LOCATION_ONFIELD,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400311,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc1=Duel.SelectMatchingCard(tp,c33400311.refilter1,tp,0,LOCATION_ONFIELD,1,1,nil) local tc1=Duel.SelectMatchingCard(tp,cm.refilter1,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc1,POS_FACEDOWN,REASON_EFFECT)
end end
end end
local k1=Duel.GetMatchingGroup(c33400311.thfilter1,tp,LOCATION_GRAVE,0,nil) local k1=Duel.GetMatchingGroup(cm.thfilter1,tp,LOCATION_GRAVE,0,nil)
local k2=Duel.GetMatchingGroup(c33400311.thfilter2,tp,LOCATION_GRAVE,0,nil) local k2=Duel.GetMatchingGroup(cm.thfilter2,tp,LOCATION_GRAVE,0,nil)
if Duel.GetTurnPlayer()~=tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (k1 or k2) then if Duel.GetTurnPlayer()~=tp and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and (k1 or k2) then
if Duel.SelectYesNo(tp,aux.Stringid(33400311,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(33400311,4)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,4))
local g=Duel.SelectMatchingCard(tp,c33400311.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil,tp) local g=Duel.SelectMatchingCard(tp,cm.thfilter3,tp,LOCATION_GRAVE,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
local b1=tc:IsSSetable() local b1=tc:IsSSetable()
local b2=tc:IsForbidden() local b2=tc:IsForbidden()
if b1 and (b2 or Duel.SelectOption(tp,aux.Stringid(33400311,2),aux.Stringid(33400311,3))==0) then if b1 and (b2 or Duel.SelectOption(tp,aux.Stringid(m,2),aux.Stringid(m,3))==0) then
Duel.SSet(tp,tc) Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
else else
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end end
end end
end end
end end
end end
function c33400311.sumlimit(e,c,sump,sumtype,sumpos,targetp) function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp)
return bit.band(sumpos,POS_FACEDOWN)~=0 return bit.band(sumpos,POS_FACEDOWN)~=0
end end
function c33400311.distg(e,c) function cm.distg(e,c)
return c:IsFacedown() return c:IsFacedown()
end end
function c33400311.refilter1(c) function cm.refilter1(c)
return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP) return c:IsAbleToRemove() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end end
function c33400311.thfilter1(c) function cm.thfilter1(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable() return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end end
function c33400311.thfilter2(c) function cm.thfilter2(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsForbidden() return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and not c:IsForbidden()
end end
function c33400311.thfilter3(c) function cm.thfilter3(c)
return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSSetable() or not c:IsForbidden()) return c:IsSetCard(0x5341) and c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsSSetable() or not c:IsForbidden())
end end
function c33400311.imfilter(c) function cm.imfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400311.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.imtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33400311.imfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.imfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400311.imfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.imfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33400311.imfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.imfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400311.imop(e,tp,eg,ep,ev,re,r,rp) function cm.imop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
--夜刀神天香 毁灭 --夜刀神天香 毁灭
function c33400312.initial_effect(c) local m=33400312
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--activate limit --activate limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TODECK) e1:SetCategory(CATEGORY_TODECK)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING) e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCountLimit(1,33400312) e1:SetCountLimit(1,m)
e1:SetCondition(aux.bdcon) e1:SetCondition(aux.bdcon)
e1:SetOperation(c33400312.alsop) e1:SetOperation(cm.alsop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
-- Double damage -- Double damage
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,33400312+10000) e2:SetCountLimit(1,m+10000)
e2:SetTarget(c33400312.dbtg) e2:SetTarget(cm.dbtg)
e2:SetOperation(c33400312.dbop) e2:SetOperation(cm.dbop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c33400312.tdfilter1(c) function cm.tdfilter1(c)
return c:IsAbleToDeck() return c:IsAbleToDeck()
end end
function c33400312.aclimit(e,re,tp) function cm.aclimit(e,re,tp)
return re:GetActivateLocation()==LOCATION_GRAVE+LOCATION_REMOVED return re:GetActivateLocation()==LOCATION_GRAVE+LOCATION_REMOVED
end end
function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) function cm.alsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1) e1:SetTargetRange(0,1)
e1:SetValue(c33400312.aclimit) e1:SetValue(cm.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.IsExistingMatchingCard(c33400312.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then if Duel.IsExistingMatchingCard(cm.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) then
if Duel.SelectYesNo(tp,aux.Stringid(33400312,0)) then if Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local tc=Duel.SelectMatchingCard(tp,c33400312.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,2,nil) local tc=Duel.SelectMatchingCard(tp,cm.tdfilter1,tp,0,LOCATION_GRAVE+LOCATION_REMOVED,1,2,nil)
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT) Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end end
end end
if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(c33400312.dbfilter,tp,LOCATION_MZONE,0,1,nil) then if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(cm.dbfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,c33400312.dbfilter,tp,LOCATION_MZONE,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.dbfilter,tp,LOCATION_MZONE,0,1,2,nil)
while tc do while tc do
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
...@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +60,7 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_IMMUNE_EFFECT) e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetValue(c33400312.efilter) e3:SetValue(cm.efilter)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetOwnerPlayer(tp) e3:SetOwnerPlayer(tp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
...@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,33 +68,33 @@ function c33400312.alsop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c33400312.efilter(e,re) function cm.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
end end
function c33400312.dbfilter(c) function cm.dbfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400312.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.dbtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33400312.dbfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.dbfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400312.dbfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.dbfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33400312.dbfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.dbfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400312.dbop(e,tp,eg,ep,ev,re,r,rp) function cm.dbop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE) e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(c33400312.damcon) e1:SetCondition(cm.damcon)
e1:SetOperation(c33400312.damop) e1:SetOperation(cm.damop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
function c33400312.damcon(e,tp,eg,ep,ev,re,r,rp) function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetBattleTarget()~=nil return ep~=tp and e:GetHandler():GetBattleTarget()~=nil
end end
function c33400312.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2) Duel.ChangeBattleDamage(1,ev*2)
end end
\ No newline at end of file
--D.A.L-夜刀神十香-ALTER --D.A.L-夜刀神十香-ALTER
function c33400320.initial_effect(c) local m=33400320
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -16,45 +18,46 @@ function c33400320.initial_effect(c) ...@@ -16,45 +18,46 @@ function c33400320.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetHintTiming(TIMING_DAMAGE_STEP) e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCountLimit(1,33400320) e1:SetCountLimit(1,m)
e1:SetCondition(c33400320.atkcon) e1:SetCondition(cm.atkcon)
e1:SetCost(c33400320.atkcost1) e1:SetCost(cm.atkcost1)
e1:SetTarget(c33400320.atktg) e1:SetTarget(cm.atktg)
e1:SetOperation(c33400320.atkop1) e1:SetOperation(cm.atkop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Equip Okatana --Equip Okatana
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_SPSUMMON_SUCCESS) e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY) e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetOperation(c33400320.Eqop1) e4:SetOperation(cm.Eqop1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
-- --
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,5))
e5:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE) e5:SetCategory(CATEGORY_TOHAND+CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_BATTLE_DESTROYING) e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(aux.bdcon) e5:SetCondition(aux.bdcon)
e5:SetOperation(c33400320.desop) e5:SetOperation(cm.desop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c33400320.atkcon(e,tp,eg,ep,ev,re,r,rp) function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated() return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end end
function c33400320.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c33400320.atkfilter(c) function cm.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x341) return c:IsFaceup() and c:IsSetCard(0x341)
end end
function c33400320.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c33400320.atkfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and cm.atkfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33400320.atkfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(cm.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c33400320.atkfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,cm.atkfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk) function cm.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -70,22 +73,22 @@ function c33400320.atkop1(e,tp,eg,ep,ev,re,r,rp,chk)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e2:SetValue(c33400320.efilter4) e2:SetValue(cm.efilter4)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
end end
end end
function c33400320.efilter4(e,te) function cm.efilter4(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP) return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end end
function c33400320.Eqop1(e,tp,eg,ep,ev,re,r,rp) function cm.Eqop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then if c:IsLocation(LOCATION_MZONE) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
c33400320.TojiEquip(c,e,tp,eg,ep,ev,re,r,rp) cm.TojiEquip(c,e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) function cm.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(tp,33400321) local token=Duel.CreateToken(tp,33400321)
Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true) Duel.MoveToField(token,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
token:CancelToGrave() token:CancelToGrave()
...@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -108,7 +111,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
local e4=Effect.CreateEffect(ec) local e4=Effect.CreateEffect(ec)
e4:SetType(EFFECT_TYPE_EQUIP) e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_IMMUNE_EFFECT) e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetValue(c33400320.efilter1) e4:SetValue(cm.efilter1)
token:RegisterEffect(e4) token:RegisterEffect(e4)
--indes --indes
local e5=Effect.CreateEffect(ec) local e5=Effect.CreateEffect(ec)
...@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +119,7 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e5:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e5:SetValue(c33400320.valcon) e5:SetValue(cm.valcon)
e5:SetCountLimit(1) e5:SetCountLimit(1)
token:RegisterEffect(e5) token:RegisterEffect(e5)
--atkup --atkup
...@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp) ...@@ -127,20 +130,20 @@ function c33400320.TojiEquip(ec,e,tp,eg,ep,ev,re,r,rp)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetOperation(c33400320.atkop) e3:SetOperation(cm.atkop)
token:RegisterEffect(e3) token:RegisterEffect(e3)
return true return true
else Duel.SendtoGrave(token,REASON_RULE) return false else Duel.SendtoGrave(token,REASON_RULE) return false
end end
end end
function c33400320.efilter1(e,re) function cm.efilter1(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end end
function c33400320.valcon(e,re,r,rp) function cm.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0 return bit.band(r,REASON_EFFECT)~=0
end end
function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp) function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ec=c:GetEquipTarget() local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) then if ec and c:IsRelateToEffect(e) then
...@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -152,10 +155,10 @@ function c33400320.atkop(e,tp,eg,ep,ev,re,r,rp)
ec:RegisterEffect(e1) ec:RegisterEffect(e1)
end end
end end
function c33400320.refilter(c) function cm.refilter(c)
return c:IsAbleToRemove() return c:IsAbleToRemove()
end end
function c33400320.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil) local g1=Duel.GetMatchingGroup(nil,tp,0,LOCATION_ONFIELD,nil)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -167,14 +170,14 @@ local c=e:GetHandler() ...@@ -167,14 +170,14 @@ local c=e:GetHandler()
if c:IsChainAttackable() then if c:IsChainAttackable() then
Duel.ChainAttack() Duel.ChainAttack()
end end
if Duel.SelectYesNo(tp,aux.Stringid(33400320,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=g1:Select(tp,1,1,nil) local tc=g1:Select(tp,1,1,nil)
Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT) Duel.Remove(tc,POS_FACEDOWN,REASON_EFFECT)
end end
if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)and Duel.IsExistingMatchingCard(c33400320.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(33400320,2)) then if Duel.GetTurnPlayer()~=tp and Duel.IsExistingMatchingCard(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil)and Duel.IsExistingMatchingCard(cm.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil) local g3=Duel.GetMatchingGroup(nil,tp,LOCATION_MZONE+LOCATION_HAND,0,nil)
local g4=Duel.GetMatchingGroup(c33400320.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil) local g4=Duel.GetMatchingGroup(cm.refilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
local t3=g3:GetCount() local t3=g3:GetCount()
local t4=g4:GetCount() local t4=g4:GetCount()
local t5 local t5
......
...@@ -18,12 +18,14 @@ function cm.initial_effect(c) ...@@ -18,12 +18,14 @@ function cm.initial_effect(c)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e1:Clone() local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY) e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCondition(cm.con) e3:SetCondition(cm.con)
e3:SetOperation(cm.op)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon --spsummon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
......
...@@ -41,6 +41,7 @@ end ...@@ -41,6 +41,7 @@ end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(cm.filter1,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,e,tp) local b2=Duel.IsExistingMatchingCard(cm.filter2,tp,LOCATION_DECK,0,1,nil,e,tp)
--local b2=true
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
......
--Neo-Aspect宇田川亚子 --Neo-Aspect宇田川亚子
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=65010100 local m=65010100
local cm=_G["c"..m] local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,4,2) aux.AddXyzProcedure(c,nil,4,2)
local e1=rsef.FV_LIMIT(c,"dis",nil,cm.tg,{LOCATION_ONFIELD,LOCATION_ONFIELD }) --material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetCost(cm.discost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
...@@ -14,7 +24,31 @@ function cm.initial_effect(c) ...@@ -14,7 +24,31 @@ function cm.initial_effect(c)
e2:SetOperation(cm.disop) e2:SetOperation(cm.disop)
e2:SetLabelObject(tc) e2:SetLabelObject(tc)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=rsef.QO(c,nil,{m,0},{1,m},nil,"tg",LOCATION_MZONE,nil,rscost.rmxyz(2),rstg.target(cm.xyzfilter,nil,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c),cm.xyzop) end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,2,2,REASON_COST)
end
function cm.filter(c)
return c:IsCanOverlay()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.filter(chkc) and chkc~=e:GetHandler() end
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ)
and Duel.IsExistingTarget(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
Duel.SelectTarget(tp,cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) then
local og=tc:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(c,Group.FromCards(tc))
end
end end
function cm.xyzfilter(c,e,tp) function cm.xyzfilter(c,e,tp)
return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler()) return not c:IsType(TYPE_TOKEN) and (c:IsControler(tp) or c:IsAbleToChangeControler())
......
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