Commit e821e5b6 authored by Tachibana's avatar Tachibana

ndyd

parent 6869bd0b
...@@ -12,6 +12,7 @@ function cm.initial_effect(c) ...@@ -12,6 +12,7 @@ function cm.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetOperation(cm.op) e1:SetOperation(cm.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT) e2:SetCode(EFFECT_IMMUNE_EFFECT)
...@@ -84,7 +85,7 @@ function cm.repfilter(c,tp) ...@@ -84,7 +85,7 @@ function cm.repfilter(c,tp)
end end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return eg:IsExists(cm.repfilter,1,nil,tp) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,eg) end
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local g=eg:Filter(cm.repfilter,nil,tp) local g=eg:Filter(cm.repfilter,nil,tp)
local ct=g:GetCount() local ct=g:GetCount()
...@@ -128,6 +129,7 @@ function cm.tg(e,c) ...@@ -128,6 +129,7 @@ function cm.tg(e,c)
local qc=rc:GetEquipTarget() local qc=rc:GetEquipTarget()
if qc then if qc then
local eg=qc:GetEquipGroup() local eg=qc:GetEquipGroup()
if eg:GetCount()<3 then return false end
return eg:IsContains(c) or c==qc return eg:IsContains(c) or c==qc
end end
return false return false
......
...@@ -36,8 +36,9 @@ function c19500043.initial_effect(c) ...@@ -36,8 +36,9 @@ function c19500043.initial_effect(c)
e4:SetDescription(aux.Stringid(19500043,2)) e4:SetDescription(aux.Stringid(19500043,2))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY) e4:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode((EVENT_BATTLE_DESTROYING) or (EVENT_BATTLED)) e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(c19500043.xyzcon) e4:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e4:SetCondition(aux.bdocon)
e4:SetTarget(c19500043.tdtg) e4:SetTarget(c19500043.tdtg)
e4:SetOperation(c19500043.tdop) e4:SetOperation(c19500043.tdop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
...@@ -99,6 +100,7 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -99,6 +100,7 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return end
Duel.ConfirmDecktop(tp,3) Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
Duel.DisableShuffleCheck()
local dest=Duel.Destroy(g,REASON_EFFECT) local dest=Duel.Destroy(g,REASON_EFFECT)
if dest>0 then if dest>0 then
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
...@@ -153,42 +155,28 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -153,42 +155,28 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
Duel.BreakEffect() Duel.BreakEffect()
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
for tc in aux.Next(dis) do for tc in aux.Next(dis) do
--battle damage --battle damage
if tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then if tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
local atk1=tc:GetAttack() Duel.CalculateDamage(c,tc,true)
local atk2=c:GetAttack() if c:GetAttack()>tc:GetAttack() then
local def=tc:GetDefense()
local dam1=atk2-def
local dam2=atk2-atk1
Duel.BreakEffect()
if true then
if dam2>0 then
Duel.Damage(1-tp,dam2,REASON_BATTLE)
Duel.Destroy(tc,REASON_BATTLE) Duel.Destroy(tc,REASON_BATTLE)
elseif dam2==0 then elseif c:GetAttack()==tc:GetAttack()then
local desg=Group.FromCards(tc,c) local gr=Group.FromCards(c,tc)
Duel.Destroy(desg,REASON_BATTLE) Duel.Destroy(gr,REASON_BATTLE)
else else
Duel.Damage(tp,-dam2,REASON_BATTLE)
Duel.Destroy(c,REASON_BATTLE) Duel.Destroy(c,REASON_BATTLE)
return
end
end end
end end
Duel.BreakEffect()
end end
end end
end end
end end
function c19500043.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() then return false end
e:SetLabelObject(tc)
return tc:IsType(TYPE_MONSTER) and tc:IsReason((REASON_BATTLE) or (EVENT_BATTLED)) and tc:IsCanOverlay()
end
function c19500043.tdtg(e,tp,eg,ep,ev,re,r,rp,chk) function c19500043.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c19500043[0]==0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end if chk==0 then return not (c19500043[0]>0) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,2,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil) local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
c19500043[0]=c19500043[0]+1 c19500043[0]=c19500043[0]+1
...@@ -207,3 +195,4 @@ function c19500043.tdop(e,tp,eg,ep,ev,re,r,rp) ...@@ -207,3 +195,4 @@ function c19500043.tdop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
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