Commit 6096fc90 authored by DailyShana's avatar DailyShana

fix

parent 79747c54
......@@ -24,6 +24,7 @@ function c20137754.initial_effect(c)
e3:SetHintTiming(TIMING_DAMAGE_STEP)
e3:SetCountLimit(1)
e3:SetCondition(c20137754.atkcon)
e3:SetTarget(c20137754.atktg)
e3:SetOperation(c20137754.atkop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
......@@ -52,13 +53,15 @@ end
function c20137754.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(20137754)>0
and (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
and Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER):GetCount()>0
end
function c20137754.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)>0 end
end
function c20137754.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_MONSTER)
local val=g:GetClassCount(Card.GetCode)*200
if c:IsFaceup() and c:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) and val>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
......
......@@ -20,7 +20,7 @@ function c30270176.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_UNCOPYABLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(c30270176.immval)
c:RegisterEffect(e3)
......@@ -29,7 +29,7 @@ function c30270176.initial_effect(c)
e4:SetDescription(aux.Stringid(30270176,0))
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetCondition(aux.bdocon)
e4:SetCondition(c30270176.atkcon)
e4:SetTarget(c30270176.atktg)
e4:SetOperation(c30270176.atkop)
c:RegisterEffect(e4)
......@@ -69,20 +69,17 @@ function c30270176.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.ShuffleHand(tp)
end
function c30270176.immval(e,te)
return te:IsActiveType(TYPE_MONSTER) and te:IsActivated() and te:GetOwner():GetBaseAttack()<=3000 and te:GetOwner()~=e:GetHandler()
return te:GetOwner()~=e:GetHandler() and te:IsActiveType(TYPE_MONSTER) and te:IsActivated()
and te:GetOwner():GetBaseAttack()<=3000 and te:GetOwner():GetBaseAttack()>=0
end
function c30270176.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and aux.bdcon(e,tp,eg,ep,ev,re,r,rp)
end
function c30270176.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToBattle() and not e:GetHandler():IsHasEffect(EFFECT_EXTRA_ATTACK) end
if chk==0 then return e:GetHandler():IsChainAttackable() end
end
function c30270176.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
c:RegisterEffect(e1)
Duel.ChainAttack()
end
function c30270176.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
......
......@@ -90,12 +90,12 @@ function c34325937.activate(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function c34325937.cfilter(c,tp)
function c34325937.cfilter(c)
return c:IsSetCard(0xe3) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousPosition(POS_FACEUP)
end
function c34325937.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c34325937.cfilter,1,nil,tp)
return eg:IsExists(c34325937.cfilter,1,nil)
end
function c34325937.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
......
......@@ -14,7 +14,7 @@ function c7198399.initial_effect(c)
--change battle target
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(7198399,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
......
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