Commit a7080db4 authored by wind2009's avatar wind2009

Fix

parent fb52a617
...@@ -9,7 +9,7 @@ function s.initial_effect(c) ...@@ -9,7 +9,7 @@ function s.initial_effect(c)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target) e1:SetTarget(s.target)
e1:SetOperation(s.activate) e1:SetOperation(s.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -28,6 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,6 +28,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeChainOperation(ev,s.repop) Duel.ChangeChainOperation(ev,s.repop)
end end
function s.repop(e,tp,eg,ep,ev,re,r,rp) function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_ATOHAND)
local sg=Duel.SelectMatchingCard(1-tp,s.thfilter,1-tp,LOCATION_DECK,0,1,1,nil) local sg=Duel.SelectMatchingCard(1-tp,s.thfilter,1-tp,LOCATION_DECK,0,1,1,nil)
local tc=sg:GetFirst() local tc=sg:GetFirst()
if tc and Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 then if tc and Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 then
......
...@@ -40,6 +40,7 @@ function s.pfilter(c,tp) ...@@ -40,6 +40,7 @@ function s.pfilter(c,tp)
end end
function s.sfilter(c,e,tp) function s.sfilter(c,e,tp)
return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp) return c:GetOriginalType()&TYPE_MONSTER>0 and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,1-tp,false,false,POS_FACEUP,1-tp)
and Duel.GetLP(1-tp)>=c:GetBaseAttack()
end end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=0 local ft=0
...@@ -60,7 +61,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -60,7 +61,6 @@ function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetCategory(0) e:SetCategory(0)
elseif op==2 then elseif op==2 then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end end
end end
function s.setop(e,tp,eg,ep,ev,re,r,rp) function s.setop(e,tp,eg,ep,ev,re,r,rp)
......
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