Commit 34920520 authored by VanillaSalt's avatar VanillaSalt

fix

parent c31c17bb
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function c11052544.activate(e,tp,eg,ep,ev,re,r,rp) function c11052544.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil) local ct=Duel.GetMatchingGroupCount(c11052544.cfilter,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler()) local g=Duel.GetMatchingGroup(c11052544.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())
if g:GetCount()>ct then if g:GetCount()>=ct then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local sg=g:Select(tp,ct,ct,nil) local sg=g:Select(tp,ct,ct,nil)
Duel.HintSelection(sg) Duel.HintSelection(sg)
......
...@@ -3,7 +3,10 @@ function c22359980.initial_effect(c) ...@@ -3,7 +3,10 @@ function c22359980.initial_effect(c)
--activate --activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_DAMAGE_STEP)
e1:SetCondition(c22359980.condition)
e1:SetTarget(c22359980.target) e1:SetTarget(c22359980.target)
e1:SetOperation(c22359980.operation) e1:SetOperation(c22359980.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -38,6 +41,9 @@ function c22359980.initial_effect(c) ...@@ -38,6 +41,9 @@ function c22359980.initial_effect(c)
e4:SetOperation(c22359980.mtop) e4:SetOperation(c22359980.mtop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c22359980.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c22359980.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22359980.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
e:GetLabelObject():Clear() e:GetLabelObject():Clear()
......
...@@ -5,7 +5,6 @@ function c31615285.initial_effect(c) ...@@ -5,7 +5,6 @@ function c31615285.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.FALSE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--disable spsummon --disable spsummon
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
...@@ -21,5 +20,5 @@ function c31615285.filter(c) ...@@ -21,5 +20,5 @@ function c31615285.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c31615285.dscon(e) function c31615285.dscon(e)
return Duel.IsExistingMatchingCard(c31615285.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler()) return Duel.IsExistingMatchingCard(c31615285.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
end end
...@@ -29,12 +29,12 @@ function c54974237.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,12 +29,12 @@ function c54974237.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ty=TYPE_SPELL local ty=TYPE_SPELL
if ac==1 then ty=TYPE_TRAP end if ac==1 then ty=TYPE_TRAP end
e:SetLabel(ty) e:SetLabel(ty)
local g=Duel.GetMatchingGroup(c54974237.tgfilter,tp,0,LOCATION_SZONE,nil,ty) local g=Duel.GetMatchingGroup(c54974237.tgfilter,tp,0,LOCATION_ONFIELD,nil,ty)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c54974237.activate(e,tp,eg,ep,ev,re,r,rp) function c54974237.activate(e,tp,eg,ep,ev,re,r,rp)
local ty=e:GetLabel() local ty=e:GetLabel()
local conf=Duel.GetFieldGroup(tp,0,LOCATION_SZONE+LOCATION_HAND) local conf=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD+LOCATION_HAND)
if conf:GetCount()>0 then if conf:GetCount()>0 then
Duel.ConfirmCards(tp,conf) Duel.ConfirmCards(tp,conf)
local dg=conf:Filter(Card.IsType,nil,ty) local dg=conf:Filter(Card.IsType,nil,ty)
......
...@@ -30,7 +30,7 @@ function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -30,7 +30,7 @@ function c56339050.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE) e:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET) e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
local dam=tc:GetAttack() local dam=tc:GetAttack()/2
Duel.SetTargetParam(dam) Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
...@@ -44,7 +44,7 @@ end ...@@ -44,7 +44,7 @@ end
function c56339050.operation(e,tp,eg,ep,ev,re,r,rp) function c56339050.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsAttackable() then
local atk=tc:GetAttack() local atk=tc:GetAttack()/2
if Duel.Destroy(tc,REASON_EFFECT)~=0 then if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
end end
...@@ -63,7 +63,7 @@ function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -63,7 +63,7 @@ function c56339050.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0 if chk==0 then return e:GetHandler():GetFlagEffect(56339050)==0
and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end and tc:IsOnField() and tc:IsCanBeEffectTarget(e) and tc:IsDestructable() end
Duel.SetTargetCard(tc) Duel.SetTargetCard(tc)
local dam=tc:GetAttack() local dam=tc:GetAttack()/2
Duel.SetTargetParam(dam) Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
......
...@@ -24,7 +24,7 @@ function c63571750.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,7 +24,7 @@ function c63571750.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63571750,0)) e1:SetDescription(aux.Stringid(63571750,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_HAND) e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c63571750.thcon) e1:SetCondition(c63571750.thcon)
e1:SetTarget(c63571750.thtg) e1:SetTarget(c63571750.thtg)
......
...@@ -43,7 +43,7 @@ function c70902743.operation1(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,7 +43,7 @@ function c70902743.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
function c70902743.filter2(c) function c70902743.filter2(c)
return c:GetAttackedCount()==0 and c:IsDestructable() return c:GetAttackAnnouncedCount()==0 and c:IsDestructable()
end end
function c70902743.condition2(e,tp,eg,ep,ev,re,r,rp) function c70902743.condition2(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() return tp==Duel.GetTurnPlayer()
......
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