Commit 02edf53c authored by Tachibana's avatar Tachibana

ndyd

parent e5fccaf8
Pipeline #5287 passed with stage
in 20 minutes and 24 seconds
No preview for this file type
...@@ -64,6 +64,18 @@ function cm.initial_effect(c) ...@@ -64,6 +64,18 @@ function cm.initial_effect(c)
e6:SetTarget(cm.rttg) e6:SetTarget(cm.rttg)
e6:SetOperation(cm.rtop) e6:SetOperation(cm.rtop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.setlimit(e,c,tp) function cm.setlimit(e,c,tp)
return c:IsType(TYPE_FIELD) return c:IsType(TYPE_FIELD)
......
...@@ -3,7 +3,7 @@ local m=26807007 ...@@ -3,7 +3,7 @@ local m=26807007
local scard=c26807007 local scard=c26807007
local id=26807007 local id=26807007
local cm=_G["c"..m] local cm=_G["c"..m]
Duel.LoadScript("c26800000.lua") Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e0=Effect.CreateEffect(c) local e0=Effect.CreateEffect(c)
...@@ -73,6 +73,18 @@ function cm.initial_effect(c) ...@@ -73,6 +73,18 @@ function cm.initial_effect(c)
e6:SetTarget(cm.tdtg) e6:SetTarget(cm.tdtg)
e6:SetOperation(cm.tdop) e6:SetOperation(cm.tdop)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.cfilter(c,tp) function cm.cfilter(c,tp)
return c:GetOwner()==1-tp and c:IsAbleToRemoveAsCost() return c:GetOwner()==1-tp and c:IsAbleToRemoveAsCost()
......
--C.T.C
function c28300000.initial_effect(c)
end
...@@ -40,6 +40,18 @@ function c33330082.initial_effect(c) ...@@ -40,6 +40,18 @@ function c33330082.initial_effect(c)
e5:SetRange(LOCATION_SZONE) e5:SetRange(LOCATION_SZONE)
e5:SetValue(c33330082.effectfilter) e5:SetValue(c33330082.effectfilter)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(c33330082.regcon)
ee:SetTarget(c33330082.regtg)
ee:SetOperation(c33330082.bgmop)
c:RegisterEffect(ee)
end
function c33330082.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function c33330082.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33330082.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -66,6 +66,18 @@ c:EnableCounterPermit(0x34f) ...@@ -66,6 +66,18 @@ c:EnableCounterPermit(0x34f)
e13:SetTargetRange(1,0) e13:SetTargetRange(1,0)
e13:SetValue(cm.actlimit) e13:SetValue(cm.actlimit)
c:RegisterEffect(e13) c:RegisterEffect(e13)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -66,6 +66,18 @@ function cm.initial_effect(c) ...@@ -66,6 +66,18 @@ function cm.initial_effect(c)
e4:SetTarget(cm.target) e4:SetTarget(cm.target)
e4:SetValue(cm.indct) e4:SetValue(cm.indct)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -58,7 +58,49 @@ function cm.initial_effect(c) ...@@ -58,7 +58,49 @@ function cm.initial_effect(c)
e3:SetCondition(cm.spcon) e3:SetCondition(cm.spcon)
e3:SetTarget(cm.sptg) e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop) e3:SetOperation(cm.spop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return true
end
local c=e:GetHandler()
--to grave
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetCondition(cm.gycon)
e1:SetOperation(cm.gyop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:SetTurnCounter(0)
c:RegisterEffect(e1)
end
function cm.gycon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cm.gyop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==5 then
Duel.SendtoGrave(c,REASON_RULE)
end
end end
function cm.thfilter1(c) function cm.thfilter1(c)
return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x5342) or c:IsSetCard(0xc342)) and c:IsAbleToHand() return c:IsType(TYPE_MONSTER) and (c:IsSetCard(0x5342) or c:IsSetCard(0xc342)) and c:IsAbleToHand()
......
...@@ -4,297 +4,308 @@ ...@@ -4,297 +4,308 @@
local scard = c33700409 local scard = c33700409
local id = 33700409 local id = 33700409
function scard.initial_effect(c) function scard.initial_effect(c)
--Activate --Activate
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(scard.regtg) e1:SetTarget(scard.regtg)
e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetCost(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_MUSIC,0,aux.Stringid(33700409,6)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(33700409,6))
end) end)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--indes --indes
local e2 = Effect.CreateEffect(c) local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(1) e2:SetValue(1)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Cannot activate --Cannot activate
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ACTIVATE) e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE) e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET + EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_CANNOT_NEGATE)
e3:SetTargetRange(1, 0) e3:SetTargetRange(1, 0)
e3:SetValue(scard.efilter) e3:SetValue(scard.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--cannot set --cannot set
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SSET) e4:SetCode(EFFECT_CANNOT_SSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(1, 0) e4:SetTargetRange(1, 0)
e4:SetTarget(scard.setfilter) e4:SetTarget(scard.setfilter)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--Special Summon token --Special Summon token
local e5 = Effect.CreateEffect(c) local e5 = Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN) e5:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_IGNITION) e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE) e5:SetRange(LOCATION_FZONE)
e5:SetProperty(EFFECT_FLAG_BOTH_SIDE) e5:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e5:SetTarget(scard.tktg) e5:SetTarget(scard.tktg)
e5:SetOperation(scard.tkop) e5:SetOperation(scard.tkop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--cannot special summon --cannot special summon
local e6 = Effect.CreateEffect(c) local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_FZONE) e6:SetRange(LOCATION_FZONE)
e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1, 0) e6:SetTargetRange(1, 0)
e6:SetTarget(scard.splimit) e6:SetTarget(scard.splimit)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--cannot link material --cannot link material
local e7 = Effect.CreateEffect(c) local e7 = Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD) e7:SetType(EFFECT_TYPE_FIELD)
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE) e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
e7:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1)) e7:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1))
e7:SetValue(1) e7:SetValue(1)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--release all --release all
local e8 = Effect.CreateEffect(c) local e8 = Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_RECOVER) e8:SetCategory(CATEGORY_RECOVER)
e8:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE) e8:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
e8:SetCode(EVENT_LEAVE_FIELD) e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetTarget(scard.reltg) e8:SetTarget(scard.reltg)
e8:SetOperation(scard.relop) e8:SetOperation(scard.relop)
c:RegisterEffect(e8) c:RegisterEffect(e8)
--oops tcg didn't ban cannon soldier --oops tcg didn't ban cannon soldier
local e9 = Effect.CreateEffect(c) local e9 = Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD) e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CHANGE_DAMAGE) e9:SetCode(EFFECT_CHANGE_DAMAGE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e9:SetRange(LOCATION_FZONE) e9:SetRange(LOCATION_FZONE)
e9:SetTargetRange(1, 1) e9:SetTargetRange(1, 1)
e9:SetValue(scard.damval) e9:SetValue(scard.damval)
c:RegisterEffect(e9) c:RegisterEffect(e9)
local ea = e9:Clone() local ea = e9:Clone()
ea:SetCode(EFFECT_NO_EFFECT_DAMAGE) ea:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(ea) c:RegisterEffect(ea)
if not scard.global_check then if not scard.global_check then
scard.global_check = true scard.global_check = true
scard[0] = 0 scard[0] = 0
scard[1] = 0 scard[1] = 0
scard.release_check = false scard.release_check = false
scard.summon_check = false scard.summon_check = false
end end
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(scard.regtg)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function scard.efilter(e, re, tp) function scard.efilter(e, re, tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function scard.setfilter(e, c) function scard.setfilter(e, c)
return c:IsType(TYPE_FIELD) return c:IsType(TYPE_FIELD)
end end
function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk) function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return true return true
end end
local c = e:GetHandler() local c = e:GetHandler()
--to grave --to grave
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_PHASE + PHASE_END) e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE) e1:SetRange(LOCATION_FZONE)
e1:SetCondition(scard.gycon) e1:SetCondition(scard.gycon)
e1:SetOperation(scard.gyop) e1:SetOperation(scard.gyop)
e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_SELF_TURN, 5) e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END + RESET_SELF_TURN, 5)
c:SetTurnCounter(0) c:SetTurnCounter(0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function scard.gycon(e, tp, eg, ep, ev, re, r, rp) function scard.gycon(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnPlayer() == tp return Duel.GetTurnPlayer() == tp
end end
function scard.gyop(e, tp, eg, ep, ev, re, r, rp) function scard.gyop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler() local c = e:GetHandler()
local ct = c:GetTurnCounter() local ct = c:GetTurnCounter()
ct = ct + 1 ct = ct + 1
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct == 5 then if ct == 5 then
Duel.SendtoGrave(c, REASON_EFFECT) Duel.SendtoGrave(c, REASON_EFFECT)
end end
end end
function scard.IsCanSummonAkariToken(tp) function scard.IsCanSummonAkariToken(tp)
return Duel.IsPlayerCanSpecialSummonMonster( return Duel.IsPlayerCanSpecialSummonMonster(
tp, tp,
id + 1, id + 1,
0, 0,
TYPE_MONSTER + TYPE_NORMAL + TYPE_TOKEN, TYPE_MONSTER + TYPE_NORMAL + TYPE_TOKEN,
1000, 1000,
1000, 1000,
1, 1,
RACE_CYBERSE, RACE_CYBERSE,
ATTRIBUTE_LIGHT, ATTRIBUTE_LIGHT,
POS_FACEUP POS_FACEUP
) )
end end
function scard.tktg(e, tp, eg, ep, ev, re, r, rp, chk) function scard.tktg(e, tp, eg, ep, ev, re, r, rp, chk)
scard.summon_check = true scard.summon_check = true
if chk == 0 then if chk == 0 then
return ((scard[tp] & 0x1) == 0 or (scard[tp] & 0x2) == 0 or (scard[tp] & 0x4) == 0 or (scard[tp] & 0x8) == 0 or return ((scard[tp] & 0x1) == 0 or (scard[tp] & 0x2) == 0 or (scard[tp] & 0x4) == 0 or (scard[tp] & 0x8) == 0 or
(scard[tp] & 0x10) == 0) and (scard[tp] & 0x10) == 0) and
scard.IsCanSummonAkariToken(tp) and scard.IsCanSummonAkariToken(tp) and
Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 Duel.GetLocationCount(tp, LOCATION_MZONE) > 0
end end
Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0) Duel.SetOperationInfo(0, CATEGORY_TOKEN, nil, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0) Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, nil, 1, tp, 0)
scard.summon_check = false scard.summon_check = false
end end
function scard.tkop(e, tp, eg, ep, ev, re, r, rp) function scard.tkop(e, tp, eg, ep, ev, re, r, rp)
scard.summon_check = true scard.summon_check = true
local c = e:GetHandler() local c = e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp, LOCATION_MZONE) < 1 or not scard.IsCanSummonAkariToken(tp) then if not c:IsRelateToEffect(e) or Duel.GetLocationCount(tp, LOCATION_MZONE) < 1 or not scard.IsCanSummonAkariToken(tp) then
return return
end end
local token = Duel.CreateToken(tp, id + 1) local token = Duel.CreateToken(tp, id + 1)
local flag = 0 local flag = 0
Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP) Duel.SpecialSummonStep(token, 0, tp, tp, false, false, POS_FACEUP)
if (scard[tp] & 0x1) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then if (scard[tp] & 0x1) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
--atk --atk
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1500) e1:SetValue(1500)
e1:SetReset(RESET_EVENT + RESETS_STANDARD) e1:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e1) token:RegisterEffect(e1)
local e2 = e1:Clone() local e2 = e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE) e2:SetCode(EFFECT_UPDATE_DEFENSE)
token:RegisterEffect(e2) token:RegisterEffect(e2)
flag = flag | 0x1 flag = flag | 0x1
token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 0)) token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 0))
end end
if (scard[tp] & 0x2) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then if (scard[tp] & 0x2) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
--indes --indes
local e3 = Effect.CreateEffect(c) local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE) e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1) e3:SetValue(1)
e3:SetReset(RESET_EVENT + RESETS_STANDARD) e3:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e3) token:RegisterEffect(e3)
flag = flag | 0x2 flag = flag | 0x2
token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 1)) token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 1))
end end
if (scard[tp] & 0x4) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then if (scard[tp] & 0x4) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 2)) then
--indes --indes
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1) e4:SetValue(1)
e4:SetReset(RESET_EVENT + RESETS_STANDARD) e4:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e4) token:RegisterEffect(e4)
flag = flag | 0x4 flag = flag | 0x4
token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 2)) token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 2))
end end
if (scard[tp] & 0x8) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 3)) then if (scard[tp] & 0x8) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 3)) then
--cannot be target --cannot be target
local e5 = Effect.CreateEffect(c) local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetValue(1) e5:SetValue(1)
e5:SetReset(RESET_EVENT + RESETS_STANDARD) e5:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e5) token:RegisterEffect(e5)
local e6 = e5:Clone() local e6 = e5:Clone()
e6:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e6:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
c:RegisterEffect(e6) c:RegisterEffect(e6)
flag = flag | 0x8 flag = flag | 0x8
token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 3)) token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 3))
end end
if flag == 0 or (scard[tp] & 0x10) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 4)) then if flag == 0 or (scard[tp] & 0x10) == 0 and Duel.SelectYesNo(tp, aux.Stringid(id, 4)) then
--cannot release --cannot release
local e7 = Effect.CreateEffect(c) local e7 = Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE) e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e7:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e7:SetRange(LOCATION_MZONE) e7:SetRange(LOCATION_MZONE)
e7:SetCode(EFFECT_UNRELEASABLE_SUM) e7:SetCode(EFFECT_UNRELEASABLE_SUM)
e7:SetValue(1) e7:SetValue(1)
e7:SetReset(RESET_EVENT + RESETS_STANDARD) e7:SetReset(RESET_EVENT + RESETS_STANDARD)
token:RegisterEffect(e7) token:RegisterEffect(e7)
local e8 = Effect.CreateEffect(c) local e8 = Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD) e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_RELEASE) e8:SetCode(EFFECT_CANNOT_RELEASE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_MZONE) e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(1, 1) e8:SetTargetRange(1, 1)
e8:SetTarget(scard.relval) e8:SetTarget(scard.relval)
e8:SetValue(1) e8:SetValue(1)
token:RegisterEffect(e8) token:RegisterEffect(e8)
flag = flag | 0x10 flag = flag | 0x10
token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 4)) token:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, 0, aux.Stringid(id, 4))
end end
--reset effects --reset effects
local e9 = Effect.CreateEffect(c) local e9 = Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_SINGLE) e9:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_SINGLE)
e9:SetCode(EVENT_LEAVE_FIELD) e9:SetCode(EVENT_LEAVE_FIELD)
e9:SetOperation(scard.resetop) e9:SetOperation(scard.resetop)
e9:SetLabel(flag) e9:SetLabel(flag)
token:RegisterEffect(e9) token:RegisterEffect(e9)
scard[tp] = scard[tp] | flag scard[tp] = scard[tp] | flag
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
scard.summon_check = false scard.summon_check = false
end end
function scard.relval(e, c) function scard.relval(e, c)
return c == e:GetHandler() and not scard.release_check return c == e:GetHandler() and not scard.release_check
end end
function scard.resetop(e, tp, eg, ep, ev, re, r, rp) function scard.resetop(e, tp, eg, ep, ev, re, r, rp)
local p = e:GetHandler():GetPreviousControler() local p = e:GetHandler():GetPreviousControler()
scard[p] = scard[p] - e:GetLabel() scard[p] = scard[p] - e:GetLabel()
end end
function scard.splimit(e,c,sump,sumtype,sumpos,targetp,se) function scard.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return se and e:GetHandler()~=se:GetHandler() return se and e:GetHandler()~=se:GetHandler()
end end
function scard.relfilter(c) function scard.relfilter(c)
return c:IsCode(id + 1) and c:IsReleasableByEffect() return c:IsCode(id + 1) and c:IsReleasableByEffect()
end end
function scard.reltg(e, tp, eg, ep, ev, re, r, rp, chk) function scard.reltg(e, tp, eg, ep, ev, re, r, rp, chk)
scard.release_check = true scard.release_check = true
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return not c:IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown()) return not c:IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown())
end end
local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil) local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
Duel.SetOperationInfo(0, CATEGORY_RELEASE, g, #g, 0, 0) Duel.SetOperationInfo(0, CATEGORY_RELEASE, g, #g, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, 0) Duel.SetOperationInfo(0, CATEGORY_RECOVER, nil, 0, tp, 0)
scard.release_check = false scard.release_check = false
end end
function scard.relop(e, tp, eg, ep, ev, re, r, rp) function scard.relop(e, tp, eg, ep, ev, re, r, rp)
scard.release_check = true scard.release_check = true
local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil) local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
Duel.Release(g, REASON_EFFECT) Duel.Release(g, REASON_EFFECT)
local og = Duel.GetOperatedGroup() local og = Duel.GetOperatedGroup()
if #og > 0 then if #og > 0 then
atk = og:GetSum(Card.GetPreviousAttackOnField) atk = og:GetSum(Card.GetPreviousAttackOnField)
Duel.Recover(tp, atk, REASON_EFFECT) Duel.Recover(tp, atk, REASON_EFFECT)
Duel.Recover(1 - tp, atk, REASON_EFFECT) Duel.Recover(1 - tp, atk, REASON_EFFECT)
end end
scard.release_check = false scard.release_check = false
end end
function scard.damval(e, re, val, r, rp, rc) function scard.damval(e, re, val, r, rp, rc)
if r & REASON_EFFECT ~= 0 then if r & REASON_EFFECT ~= 0 then
return 0 return 0
end end
return val return val
end end
\ No newline at end of file
...@@ -48,6 +48,18 @@ function c65000064.initial_effect(c) ...@@ -48,6 +48,18 @@ function c65000064.initial_effect(c)
e5:SetTarget(cm.eftg) e5:SetTarget(cm.eftg)
e5:SetLabelObject(e4) e5:SetLabelObject(e4)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
cm.toss_coin=true cm.toss_coin=true
function cm.val(e,c) function cm.val(e,c)
......
...@@ -73,6 +73,18 @@ function cm.initial_effect(c) ...@@ -73,6 +73,18 @@ function cm.initial_effect(c)
e7:SetTargetRange(1,0) e7:SetTargetRange(1,0)
e7:SetValue(cm.actlimit) e7:SetValue(cm.actlimit)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -55,6 +55,18 @@ function cm.initial_effect(c) ...@@ -55,6 +55,18 @@ function cm.initial_effect(c)
e6:SetTargetRange(1,0) e6:SetTargetRange(1,0)
e6:SetValue(cm.actlimit) e6:SetValue(cm.actlimit)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(cm.regtg)
ee:SetOperation(cm.bgmop)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.regtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -108,6 +108,20 @@ function scard.initial_effect(c) ...@@ -108,6 +108,20 @@ function scard.initial_effect(c)
ea:SetOperation(scard.addcount) ea:SetOperation(scard.addcount)
Duel.RegisterEffect(ea,0) Duel.RegisterEffect(ea,0)
end end
--open
local ee=Effect.CreateEffect(c)
ee:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
ee:SetCode(EVENT_MOVE)
ee:SetCondition(cm.regcon)
ee:SetTarget(scard.regtg)
ee:SetOperation(function()
Duel.Hint(HINT_MUSIC,0,id*16+1)
end)
c:RegisterEffect(ee)
end
function cm.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_FZONE)
end end
function scard.resetcount(e,tp,eg,ep,ev,re,r,rp) function scard.resetcount(e,tp,eg,ep,ev,re,r,rp)
scard[0]=0 scard[0]=0
......
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