Commit 211e9f3b authored by salix5's avatar salix5

fix: attacker

c21501505 暗遷士 カンゴルゴーム
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=11083
EFFECT_FLAG_CARD_TARGET is added since it is an target effect.

c64726269 光天使スケール
HintSelection is added to show which card is returned to deck.

c60080151 好敵手の記憶
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=10297
It is not an target effect, so the attacker should be determined while resolving the effect.
The condition of Attacking Moster is changed into the form similar to c70342110 次元幽閉.

c79997591 ドゥーブルパッセ
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=13260&keyword=&tag=-1
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=13246&keyword=&tag=-1
http://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=5&fid=13261&keyword=&tag=-1
The condition of Attacking Moster and Attacked Target is changed into the form similar to c70342110 次元幽閉.
parent d2f13209
...@@ -7,6 +7,7 @@ function c21501505.initial_effect(c) ...@@ -7,6 +7,7 @@ function c21501505.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21501505,0)) e1:SetDescription(aux.Stringid(21501505,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c21501505.condition) e1:SetCondition(c21501505.condition)
......
...@@ -16,14 +16,13 @@ end ...@@ -16,14 +16,13 @@ end
function c60080151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c60080151.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tg=Duel.GetAttacker() local tg=Duel.GetAttacker()
if chk==0 then return tg:IsOnField() and tg:IsAbleToRemove() end if chk==0 then return tg:IsOnField() and tg:IsAbleToRemove() end
Duel.SetTargetCard(tg)
local dam=tg:GetAttack() local dam=tg:GetAttack()
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,dam)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_REMOVE,tg,1,0,0)
end end
function c60080151.activate(e,tp,eg,ep,ev,re,r,rp) function c60080151.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetAttacker()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED) then
local dam=tc:GetAttack() local dam=tc:GetAttack()
if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then if Duel.Damage(tp,dam,REASON_EFFECT)>0 and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -40,6 +40,7 @@ function c64726269.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,6 +40,7 @@ function c64726269.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local tg=sg:Select(tp,1,1,nil) local tg=sg:Select(tp,1,1,nil)
Duel.HintSelection(tg)
Duel.SendtoDeck(tg,nil,0,REASON_EFFECT) Duel.SendtoDeck(tg,nil,0,REASON_EFFECT)
end end
end end
......
...@@ -14,10 +14,12 @@ function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -14,10 +14,12 @@ function c79997591.cbcon(e,tp,eg,ep,ev,re,r,rp)
return bt and bt:IsPosition(POS_FACEUP_ATTACK) and bt:IsControler(tp) return bt and bt:IsPosition(POS_FACEUP_ATTACK) and bt:IsControler(tp)
end end
function c79997591.cbop(e,tp,eg,ep,ev,re,r,rp) function c79997591.cbop(e,tp,eg,ep,ev,re,r,rp)
local at=Duel.GetAttacker()
local bt=Duel.GetAttackTarget() local bt=Duel.GetAttackTarget()
if at:IsAttackable() and not at:IsStatus(STATUS_ATTACK_CANCELED) and Duel.Damage(1-tp,bt:GetAttack(),REASON_EFFECT)>0 then
Duel.ChangeAttackTarget(nil) Duel.ChangeAttackTarget(nil)
end
if bt:IsRelateToBattle() and bt:IsControler(tp) then if bt:IsRelateToBattle() and bt:IsControler(tp) then
Duel.Damage(1-tp,bt:GetAttack(),REASON_EFFECT)
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_DIRECT_ATTACK) e1:SetCode(EFFECT_DIRECT_ATTACK)
......
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