Commit 096fa006 authored by Nemo Ma's avatar Nemo Ma

fix

parent e6d1554e
--波动武士·紫外光剑 --波动武士·紫外光剑
local m=11451437 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
...@@ -97,6 +96,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -97,6 +96,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_REMOVED,0,1,2,nil) local g=Duel.SelectMatchingCard(tp,cm.filter2,tp,LOCATION_REMOVED,0,1,2,nil)
if #g>0 then if #g>0 then
g:ForEach(Card.SetStatus,STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
local num=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_HAND) local num=Duel.GetOperatedGroup():FilterCount(Card.IsLocation,nil,LOCATION_HAND)
if num>0 then if num>0 then
......
--波动武士·伽马射线武装 --波动武士·伽马射线武装
local m=11451439 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon condition --spsummon condition
...@@ -149,6 +148,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -149,6 +148,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,num,nil) then if Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_REMOVED,0,num,nil) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,num,num,nil) local sg=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_REMOVED,0,num,num,nil)
sg:ForEach(Card.SetStatus,STATUS_TO_HAND_WITHOUT_CONFIRM,true)
Duel.SendtoHand(sg,tp,REASON_EFFECT) Duel.SendtoHand(sg,tp,REASON_EFFECT)
end end
end end
\ No newline at end of file
...@@ -56,7 +56,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,7 +56,7 @@ function cm.disop(e,tp,eg,ep,ev,re,r,rp)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
Duel.BreakEffect() Duel.BreakEffect()
if tc:IsStatus(STATUS_DISABLED) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if tc:IsStatus(STATUS_DISABLED) and c:GetOverlayGroup() and c:GetOverlayGroup():IsExists(Card.IsSetCard,1,nil,0xdd) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local ag=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,tc:GetCode()) local ag=Duel.GetMatchingGroup(cm.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,tc:GetCode())
if ag:GetCount()~=0 then if ag:GetCount()~=0 then
Duel.Destroy(ag,REASON_EFFECT) Duel.Destroy(ag,REASON_EFFECT)
......
...@@ -8,17 +8,19 @@ function cm.initial_effect(c) ...@@ -8,17 +8,19 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost) e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetLabel(114514)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--instant(chain) --instant(chain)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0)) e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_CONTROL)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE) e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1)
e2:SetTarget(cm.target) e2:SetTarget(cm.target)
e2:SetOperation(cm.activate) e2:SetLabel(0)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -26,24 +28,36 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -26,24 +28,36 @@ function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.PayLPCost(tp,1000) Duel.PayLPCost(tp,1000)
end 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 c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsControlerCanBeChanged() end
if chk==0 then return Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return e:GetLabel()==114514 or (c:GetFlagEffect(m)==0 and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL) local useEffect=false
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil) if e:GetLabel()~=114514 or (c:GetFlagEffect(m)==0 and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) and Duel.SelectEffectYesNo(tp,e:GetHandler())) then
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) useEffect=true
end
if useEffect then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
e:SetOperation(cm.activate)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then if Duel.GetControl(tc,tp,PHASE_END,1)~=0 then
local e1=Effect.CreateEffect(tc) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetValue(7) e1:SetValue(7)
e1:SetReset(RESET_EVENT+0xff0000) e1:SetReset(RESET_EVENT+0xff0000+RESET_CONTROL)
c:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -35,6 +35,10 @@ function cm.initial_effect(c) ...@@ -35,6 +35,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
cm.SetCard_01_YeRen=true cm.SetCard_01_YeRen=true
function cm.isYeRen(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YeRen
end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
...@@ -62,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_01_YeRen and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand() and c:IsFaceup() return cm.isYeRen(c:GetCode()) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand() and c:IsFaceup()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_REMOVED) and cm.thfilter(chkc) end
......
...@@ -35,6 +35,10 @@ function cm.initial_effect(c) ...@@ -35,6 +35,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
cm.SetCard_01_YeRen=true cm.SetCard_01_YeRen=true
function cm.isYeRen(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YeRen
end
function cm.splimit(e,se,sp,st) function cm.splimit(e,se,sp,st)
return se:IsHasType(EFFECT_TYPE_ACTIONS) return se:IsHasType(EFFECT_TYPE_ACTIONS)
end end
...@@ -62,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +66,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end end
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_01_YeRen and not c:IsCode(m) and c:IsAbleToHand() return cm.isYeRen(c:GetCode()) and not c:IsCode(m) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.thfilter(chkc) end
......
...@@ -22,11 +22,15 @@ function cm.initial_effect(c) ...@@ -22,11 +22,15 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
cm.SetCard_01_YeRen=true cm.SetCard_01_YeRen=true
function cm.isYeRen(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YeRen
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() return re:GetHandler()~=e:GetHandler()
end end
function cm.thfilter(c) function cm.thfilter(c)
return c.SetCard_01_YeRen and not c:IsCode(m) and c:IsAbleToHand() return cm.isYeRen(c:GetCode()) and not c:IsCode(m) and c:IsAbleToHand()
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
......
...@@ -15,8 +15,12 @@ function cm.initial_effect(c) ...@@ -15,8 +15,12 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
cm.SetCard_01_YeRen=true cm.SetCard_01_YeRen=true
function cm.isYeRen(code)
local ccode=_G["c"..code]
return ccode.SetCard_01_YeRen
end
function cm.tdfilter(c) function cm.tdfilter(c)
return c.SetCard_01_YeRen and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost() return cm.isYeRen(c:GetCode()) and c:IsType(TYPE_MONSTER) and c:IsAbleToDeckAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_REMOVED,0,1,nil) end
......
...@@ -19,7 +19,7 @@ function c98920149.atkfilter1(c) ...@@ -19,7 +19,7 @@ function c98920149.atkfilter1(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:GetAttack()>0 return c:IsAttribute(ATTRIBUTE_WATER) and c:GetAttack()>0
end end
function c98920149.afilter(c,e,tp) function c98920149.afilter(c,e,tp)
return c:IsSetCard(0x8e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsSetCard(0x8e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c98920149.cfilter(c,e,tp) function c98920149.cfilter(c,e,tp)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(0x8e) return c:IsFaceup() and c:IsLevelAbove(1) and c:IsSetCard(0x8e)
......
...@@ -22,19 +22,19 @@ function c9910325.initial_effect(c) ...@@ -22,19 +22,19 @@ function c9910325.initial_effect(c)
e2:SetOperation(c9910325.atkop) e2:SetOperation(c9910325.atkop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c9910325.eqfilter(c) function c9910325.eqfilter(c,tp)
return c:IsSetCard(0x5956) and c:IsFaceup() return c:IsSetCard(0x5956) and c:IsFaceup()
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,LOCATION_MZONE,LOCATION_MZONE,1,c)
end end
function c9910325.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9910325.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>1
and Duel.IsExistingTarget(c9910325.eqfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingTarget(c9910325.eqfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,nil)
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g1=Duel.SelectTarget(tp,c9910325.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) local g1=Duel.SelectTarget(tp,c9910325.eqfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g2=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE,1,1,nil) local g2=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c9910325.spop(e,tp,eg,ep,ev,re,r,rp) function c9910325.spop(e,tp,eg,ep,ev,re,r,rp)
......
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