Commit 6869bd0b authored by Tachibana's avatar Tachibana

ndyd

parent f7a35bb4
......@@ -36,8 +36,8 @@ function c19500043.initial_effect(c)
e4:SetDescription(aux.Stringid(19500043,2))
e4:SetCategory(CATEGORY_TODECK+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
e4:SetCode((EVENT_BATTLE_DESTROYING) or (EVENT_BATTLED))
e4:SetCondition(c19500043.xyzcon)
e4:SetTarget(c19500043.tdtg)
e4:SetOperation(c19500043.tdop)
c:RegisterEffect(e4)
......@@ -109,7 +109,7 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(dest*700)
e1:SetValue(ct*700)
c:RegisterEffect(e1)
--pierce
local e2=Effect.CreateEffect(e:GetHandler())
......@@ -117,7 +117,7 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_PIERCE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
--end
-- if ct>1 then
--extra attack
-- local e3=Effect.CreateEffect(c)
......@@ -126,11 +126,11 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
-- e3:SetValue(dest)
-- c:RegisterEffect(e3)
-- end
if ct==3 then
--if ct>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local dis=Duel.SelectMatchingCard(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,dest,nil)
local tc=dis:GetFirst()
while tc do
local dis=Duel.SelectMatchingCard(tp,aux.disfilter1,tp,0,LOCATION_ONFIELD,1,ct,nil)
local sg=Group.CreateGroup()
for tc in aux.Next(dis) do
--disable
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e4=Effect.CreateEffect(c)
......@@ -151,28 +151,42 @@ function c19500043.thop(e,tp,eg,ep,ev,re,r,rp)
e6:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e6)
end
end
Duel.BreakEffect()
for tc in aux.Next(dis) do
--battle damage
if tc:IsType(TYPE_MONSTER) then
if tc:IsType(TYPE_MONSTER) and tc:IsFaceup() then
local atk1=tc:GetAttack()
local atk2=c:GetAttack()
local dam=atk2-atk1
local desg=tc
local p=1-tp
if atk1>atk2 then
dam=atk1-atk2
desg=c
p=tp
elseif atk1==atk2 then
desg=Group.FromCards(tc,c)
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)
elseif dam2==0 then
local desg=Group.FromCards(tc,c)
Duel.Destroy(desg,REASON_BATTLE)
else
Duel.Damage(tp,-dam2,REASON_BATTLE)
Duel.Destroy(c,REASON_BATTLE)
return
end
end
Duel.Destroy(desg,REASON_BATTLE)
Duel.Damage(p,dam,REASON_BATTLE)
end
tc=dis:GetNext()
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)
if chk==0 then return c19500043[0]==0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
......@@ -192,5 +206,4 @@ function c19500043.tdop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
end
end
\ No newline at end of file
......@@ -12,6 +12,7 @@ function c9310037.initial_effect(c)
--act limit
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_ONFIELD)
e0:SetOperation(c9310037.chainop)
......
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