Commit 9b1355ec authored by nekrozar's avatar nekrozar

fix Drill Bug

https://www.db.yugioh-card.com/yugiohdb/faq_search.action?ope=4&cid=4775
■「穿孔虫」自身が戦闘によって相手に戦闘ダメージを与えたダメージ計算後に任意に発動する事ができる効果です。
parent 282fa7b1
...@@ -3,20 +3,24 @@ function c88733579.initial_effect(c) ...@@ -3,20 +3,24 @@ function c88733579.initial_effect(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(88733579,0)) e1:SetDescription(aux.Stringid(88733579,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DAMAGE) e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c88733579.condition) e1:SetCondition(c88733579.condition)
e1:SetTarget(c88733579.target)
e1:SetOperation(c88733579.operation) e1:SetOperation(c88733579.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c88733579.condition(e,tp,eg,ep,ev,re,r,rp) function c88733579.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp return ep==1-tp
end end
function c88733579.filter(c) function c88733579.target(e,tp,eg,ep,ev,re,r,rp,chk)
return c:IsCode(27911549) and c:GetPosition()~=POS_FACEUP_DEFENSE if chk==0 then return Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_DECK,0,1,nil,27911549)
and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>1 end
end end
function c88733579.operation(e,tp,eg,ep,ev,re,r,rp) function c88733579.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c88733579.filter,tp,LOCATION_DECK,0,nil) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(88733579,1))
local g=Duel.SelectMatchingCard(tp,Card.IsCode,tp,LOCATION_DECK,0,1,1,nil,27911549)
local tc=g:GetFirst()
if tc then if tc then
Duel.ShuffleDeck(tp) Duel.ShuffleDeck(tp)
Duel.MoveSequence(tc,0) Duel.MoveSequence(tc,0)
......
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