Commit e038e1eb authored by Tachibana's avatar Tachibana

得得得得得

parent 20cd4e8b
...@@ -26,72 +26,11 @@ function cm.initial_effect(c) ...@@ -26,72 +26,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -27,72 +27,11 @@ function cm.initial_effect(c) ...@@ -27,72 +27,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -32,72 +32,11 @@ function cm.initial_effect(c) ...@@ -32,72 +32,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -36,72 +36,11 @@ function cm.initial_effect(c) ...@@ -36,72 +36,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -32,72 +32,11 @@ function cm.initial_effect(c) ...@@ -32,72 +32,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
...@@ -29,72 +29,11 @@ function cm.initial_effect(c) ...@@ -29,72 +29,11 @@ function cm.initial_effect(c)
ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE) ex:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE)
ex:SetOperation(cm.backop) ex:SetOperation(cm.backop)
c:RegisterEffect(ex) 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 end
function cm.backop(e,tp,eg,ep,ev,re,r,rp) function cm.backop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c.upside_code or c:GetOriginalCode()~=c.downside_code then return end 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 if c:IsLocation(LOCATION_MZONE) then return end
local tcode=c.upside_code local tcode=c.upside_code
c:SetEntityCode(tcode) c:SetEntityCode(tcode)
if c:IsFacedown() then if c:IsFacedown() then
......
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