Commit b59a16ae authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into master

parents 122e68cc 47836e56
......@@ -2,7 +2,7 @@
function c1033312.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,1033312+EFFECT_COUNT_CODE_OATH)
......
......@@ -10,20 +10,20 @@ function c46291010.initial_effect(c)
e1:SetOperation(c46291010.rmop)
c:RegisterEffect(e1)
end
function c46291010.filter(c,lv)
return c:IsRace(RACE_PSYCHO) and not c:IsLevel(lv) and c:IsLevelAbove(1) and c:IsAbleToRemove()
function c46291010.filter(c)
return c:IsRace(RACE_PSYCHO) and c:IsLevelAbove(1) and c:IsAbleToRemove()
end
function c46291010.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c46291010.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.IsExistingMatchingCard(c46291010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c46291010.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c46291010.filter,tp,LOCATION_DECK,0,1,1,nil,c:GetLevel())
local g=Duel.SelectMatchingCard(tp,c46291010.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
if tc and Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
......
......@@ -68,7 +68,7 @@ end
function s.cfilter(c,tp)
return not c:IsType(TYPE_TOKEN) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousAttributeOnField()&ATTRIBUTE_FIRE~=0
and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsAttackAbove(1)
end
function s.tgfilter(c,e,tp)
return s.cfilter(c,tp) and c:IsCanBeEffectTarget(e)
......@@ -99,4 +99,4 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
end
\ No newline at end of file
end
......@@ -2,7 +2,7 @@
function c63166095.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c63166095.condition)
......@@ -23,7 +23,7 @@ function c63166095.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c63166095.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
if Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL)>=3 then
e:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
end
function c63166095.activate(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