Commit 29f8a954 authored by DailyShana's avatar DailyShana

fix

parent 366af9bc
...@@ -47,10 +47,9 @@ function c18631392.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -47,10 +47,9 @@ function c18631392.spop(e,tp,eg,ep,ev,re,r,rp,c)
end end
function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk) function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<3 then return false end if not Duel.IsPlayerCanDiscardDeck(tp,3) then return false end
local g=Duel.GetDecktopGroup(tp,3) local g=Duel.GetDecktopGroup(tp,3)
local result=g:FilterCount(Card.IsAbleToHand,nil)>0 return g:FilterCount(Card.IsAbleToHand,nil)>0
return result and Duel.IsPlayerCanDiscardDeck(tp,3)
end end
Duel.Hint(HINT_SELECTMSG,tp,0) Duel.Hint(HINT_SELECTMSG,tp,0)
local ac1=Duel.AnnounceCard(tp) local ac1=Duel.AnnounceCard(tp)
...@@ -61,8 +60,7 @@ function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,8 +60,7 @@ function c18631392.anctg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetOperation(c18631392.retop(ac1,ac2,ac3)) e:SetOperation(c18631392.retop(ac1,ac2,ac3))
end end
function c18631392.hfilter(c,code1,code2,code3) function c18631392.hfilter(c,code1,code2,code3)
local code=c:GetCode() return c:IsCode(code1,code2,code3) and c:IsAbleToHand()
return (code==code1 or code==code2 or code==code3) and c:IsAbleToHand()
end end
function c18631392.retop(code1,code2,code3) function c18631392.retop(code1,code2,code3)
return return
......
...@@ -67,14 +67,6 @@ function c24382602.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -67,14 +67,6 @@ function c24382602.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_UPDATE_DEFENCE) e2:SetCode(EFFECT_UPDATE_DEFENCE)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
end end
else
local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleDeck(tp)
cg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,cg)
Duel.ShuffleHand(tp)
end end
end end
function c24382602.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c24382602.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -27,10 +27,5 @@ function c27655513.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,10 +27,5 @@ function c27655513.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,2,2,nil) local sg=g:Select(tp,2,2,nil)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(sg,REASON_EFFECT)
elseif Duel.IsPlayerCanDiscardDeck(tp,2) then
local cg=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
Duel.ConfirmCards(1-tp,cg)
Duel.ConfirmCards(tp,cg)
Duel.ShuffleDeck(tp)
end end
end end
...@@ -7,38 +7,36 @@ function c4545854.initial_effect(c) ...@@ -7,38 +7,36 @@ function c4545854.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--ad up --ad up
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DAMAGE_CALCULATING) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c4545854.atkup) e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(c4545854.adcon)
e2:SetTarget(c4545854.adtg)
e2:SetValue(c4545854.adval)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--Destroy replace local e3=e2:Clone()
local e3=Effect.CreateEffect(c) e3:SetCode(EFFECT_UPDATE_DEFENCE)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(c4545854.desreptg)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Destroy replace
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DESTROY_REPLACE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_FZONE)
e4:SetTarget(c4545854.desreptg)
c:RegisterEffect(e4)
end
function c4545854.adcon(e)
return Duel.GetCurrentPhase()==PHASE_DAMAGE_CAL and Duel.GetAttackTarget()
end end
function c4545854.atkup(e,tp,eg,ep,ev,re,r,rp,chk) function c4545854.adtg(e,c)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if not d then return end return (c==a or c==d) and c:IsType(TYPE_XYZ)
c4545854.adup(a,e:GetHandler())
c4545854.adup(d,e:GetHandler())
end end
function c4545854.adup(c,oc) function c4545854.adval(e,c)
if not c:IsType(TYPE_XYZ) then return end return c:GetRank()*200
local e1=Effect.CreateEffect(oc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(c:GetRank()*200)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end end
function c4545854.desreptg(e,tp,eg,ep,ev,re,r,rp,chk) function c4545854.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsReason(REASON_RULE) if chk==0 then return not e:GetHandler():IsReason(REASON_RULE)
......
...@@ -20,8 +20,8 @@ function c55461064.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,8 +20,8 @@ function c55461064.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or Duel.IsDamageCalculated()) return Duel.GetTurnPlayer()~=tp and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and (ph~=PHASE_DAMAGE or Duel.IsDamageCalculated())
end end
function c55461064.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c55461064.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST) Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end end
function c55461064.filter(c) function c55461064.filter(c)
return c:IsFaceup() and c:IsSetCard(0xc008) return c:IsFaceup() and c:IsSetCard(0xc008)
......
--異界空間-Aゾーン --異界空間-Aゾーン
function c60946968.initial_effect(c) function c60946968.initial_effect(c)
--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)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk def --atk def
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_DAMAGE_CALCULATING) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE) e2:SetRange(LOCATION_FZONE)
e2:SetOperation(c60946968.adval) e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetCondition(c60946968.adcon)
e2:SetTarget(c60946968.adtg)
e2:SetValue(-300)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
end end
function c60946968.addown(c,e) function c60946968.adcon(e)
local e1=Effect.CreateEffect(e:GetHandler()) if Duel.GetCurrentPhase()~=PHASE_DAMAGE_CAL then return false end
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE_CAL)
e1:SetValue(-300)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
function c60946968.adval(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
if not d then return end if not d then return false end
if a:IsControler(1-tp) and d:IsSetCard(0xc) then c60946968.addown(a,e) end local tp=e:GetHandlerPlayer()
if d:IsControler(1-tp) and a:IsSetCard(0xc) then c60946968.addown(d,e) end if d:IsControler(1-tp) then d=Duel.GetAttacker() end
return d:IsSetCard(0xc)
end
function c60946968.adtg(e,c)
return c==Duel.GetAttacker() or c==Duel.GetAttackTarget()
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