Commit 100237f8 authored by Tachibana's avatar Tachibana

得得得得得

parent 2805752f
Pipeline #12056 passed with stages
in 26 minutes and 20 seconds
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化根绝神 阿日阿"
cm.upside_code=m-2
cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -18,6 +19,89 @@ function cm.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(cm.op)
c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化荒魔 吉戈伦"
cm.upside_code=m-25
cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -19,6 +20,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化寂魔 翁席恩"
cm.upside_code=m-25
cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -24,6 +25,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化焚魔 赫弗诺"
cm.upside_code=m-25
cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -28,6 +29,89 @@ function cm.initial_effect(c)
e3:SetValue(function(e,c)return true end)
c:RegisterEffect(e3)
e2:SetLabelObject(e3)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化洪魔 卡塔斯凯德"
cm.upside_code=m-25
cm.downside_code=m
cm.HartrazDownside=true
function cm.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
......@@ -24,6 +25,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -3,6 +3,7 @@ local cm=_G["c"..m]
cm.name="心化君魔 冬贝司"
cm.upside_code=m-25
cm.downside_code=m
cm.HartrazDownside=true
if not pcall(function() require("expansions/script/c53702500") end) then require("script/c53702500") end
function cm.initial_effect(c)
c:EnableReviveLimit()
......@@ -21,6 +22,89 @@ function cm.initial_effect(c)
e2:SetTarget(cm.rtg)
e2:SetValue(function(e,c)return true end)
c:RegisterEffect(e2)
local ex=Effect.CreateEffect(c)
ex:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ex:SetCode(EVENT_ADJUST)
ex:SetRange(0xff)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop)
c:RegisterEffect(ex)
if not cm.Hartrazcheck then
cm.Hartrazcheck=true
cm[5]=Duel.ChangePosition
Duel.ChangePosition=function(targets,au,ad,du,dd,...)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if (not ad and au==POS_FACEDOWN_DEFENSE) or (ad and ((au and au==POS_FACEDOWN_DEFENSE) or (ad and ad==POS_FACEDOWN_DEFENSE) or (du and du==POS_FACEDOWN_DEFENSE) or (dd and dd==POS_FACEDOWN_DEFENSE))) then
Duel.SendtoGrave(g,REASON_RULE)
tg:Sub(g)
end
cm[5](tg,au,ad,du,dd,...)
end
cm[6]=Duel.SendtoGrave
Duel.SendtoGrave=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[6](targets,reason)
end
cm[7]=Duel.Destroy
Duel.Destroy=function(targets,reason,...)
cm.ForcetoUpside(targets,reason)
cm[7](targets,reason,...)
end
cm[8]=Duel.Release
Duel.Release=function(targets,reason)
cm.ForcetoUpside(targets,reason)
cm[8](targets,reason)
end
cm[9]=Duel.Remove
Duel.Remove=function(targets,pos,reason)
cm.ForcetoUpside(targets,reason)
cm[9](targets,pos,reason)
end
cm[10]=Duel.SendtoDeck
Duel.SendtoDeck=function(targets,p,seq,reason)
cm.ForcetoUpside(targets,reason)
cm[10](targets,p,seq,reason)
end
cm[11]=Duel.SendtoHand
Duel.SendtoHand=function(targets,p,reason)
cm.ForcetoUpside(targets,reason)
cm[11](targets,p,reason)
end
end
end
function cm.ForcetoUpside(targets,reason)
local tg=Group.__add(targets,targets)
local g=tg:Filter(function(c)return _G["c"..c:GetOriginalCode()].HartrazDownside end,nil)
if #g>0 and reason&REASON_RULE==REASON_RULE then
for c in aux.Next(g) do
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(0,Group.FromCards(c))
Duel.ConfirmCards(1,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(c,EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
end
end
function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFaceup() then return end
local tcode=c.upside_code
c:SetEntityCode(tcode)
if c:IsFacedown() then
Duel.ConfirmCards(tp,Group.FromCards(c))
Duel.ConfirmCards(1-tp,Group.FromCards(c))
end
c:ReplaceEffect(tcode,0,0)
Duel.Hint(HINT_CARD,0,tcode)
if c:IsLocation(LOCATION_HAND) then Duel.ShuffleHand(c:GetControler()) end
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
end
function cm.immval(e,re)
local g=Duel.GetMatchingGroup(function(c)return c:IsFaceup() and c:IsType(TYPE_FUSION)end,e:GetHandlerPlayer(),LOCATION_MZONE,0,nil)
......
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