Commit 72d9d3cb authored by salix5's avatar salix5

fix

parent 053b8341
...@@ -3,8 +3,6 @@ function c15667446.initial_effect(c) ...@@ -3,8 +3,6 @@ function c15667446.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(15667446,0)) e1:SetDescription(aux.Stringid(15667446,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c15667446.spcon) e1:SetCondition(c15667446.spcon)
...@@ -23,16 +21,20 @@ function c15667446.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -23,16 +21,20 @@ function c15667446.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15667446.atfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c15667446.atfilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
if rp~=tp and tp==e:GetLabel() then if rp~=tp and tp==e:GetLabel() then
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c15667446.atfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c15667446.atfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
else
e:SetCategory(CATEGORY_SPECIAL_SUMMON)
end end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c15667446.spop(e,tp,eg,ep,ev,re,r,rp) function c15667446.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then if e:GetHandler():IsRelateToEffect(e) and Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.BreakEffect()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -24,8 +24,7 @@ function c48497555.initial_effect(c) ...@@ -24,8 +24,7 @@ function c48497555.initial_effect(c)
end end
function c48497555.condition(e,tp,eg,ep,ev,re,r,rp) function c48497555.condition(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsOnField() and rc:IsControler(1-tp) and rc:IsType(TYPE_SPELL+TYPE_TRAP) return rc:IsOnField() and rc:IsControler(1-tp) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
and not re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function c48497555.target(e,tp,eg,ep,ev,re,r,rp,chk) function c48497555.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsDestructable() end if chk==0 then return re:GetHandler():IsDestructable() end
......
...@@ -14,7 +14,8 @@ function c60228941.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,7 +14,8 @@ function c60228941.condition(e,tp,eg,ep,ev,re,r,rp)
e:SetLabel(e:GetHandler():GetPreviousControler()) e:SetLabel(e:GetHandler():GetPreviousControler())
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040 return e:GetHandler():IsPreviousLocation(LOCATION_HAND) and bit.band(r,0x4040)==0x4040
end end
function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c60228941.filter2(chkc) and chkc:IsControler(1-tp) and IsLocation(LOCATION_GRAVE) end
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if tp~=rp and tp==e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if tp~=rp and tp==e:GetLabel() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
...@@ -27,7 +28,6 @@ function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -27,7 +28,6 @@ function c60228941.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
else else
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e:SetProperty(0)
end end
end end
function c60228941.filter1(c) function c60228941.filter1(c)
......
...@@ -30,8 +30,9 @@ function c90440725.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,8 +30,9 @@ function c90440725.activate(e,tp,eg,ep,ev,re,r,rp)
c:TrapMonsterBlock() c:TrapMonsterBlock()
--cannot attack --cannot attack
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c90440725.atkcon)
e1:SetOperation(c90440725.atkop) e1:SetOperation(c90440725.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -48,17 +49,20 @@ function c90440725.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,17 +49,20 @@ function c90440725.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+0x1fe0000) e2:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c90440725.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==e:GetHandler()
end
function c90440725.atkop(e,tp,eg,ep,ev,re,r,rp) function c90440725.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(Duel.GetAttacker():GetAttack()) e1:SetValue(Duel.GetAttacker():GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_DEFENCE) e1:SetCode(EFFECT_SET_DEFENCE_FINAL)
e1:SetValue(Duel.GetAttacker():GetDefence()) e1:SetValue(Duel.GetAttacker():GetDefence())
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
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