Commit 2802100f authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-scripts

parents 1855fb71 561c00b6
......@@ -4,7 +4,7 @@ function s.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
......@@ -36,7 +36,7 @@ function s.cfilter(c,re)
or recode==EFFECT_QP_ACT_IN_SET_TURN
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,re)
return eg:IsExists(s.cfilter,1,nil,re) and r&REASON_COST>0
end
function s.tgfilter(c)
return c:IsRace(RACE_ILLUSION+RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
......
......@@ -36,6 +36,7 @@ function c49398568.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
e:SetCostCheck(false)
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
Duel.ClearOperationInfo(0)
end
function c49398568.activate(e,tp,eg,ep,ev,re,r,rp)
local fop=re:GetOperation()
......
......@@ -3,8 +3,7 @@ local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--material
aux.AddMaterialCodeList(c,38033121,46986414)
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionCode,38033121,46986414),aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_SPELLCASTER),true)
aux.AddFusionProcCodeFun(c,{46986414,38033121},aux.FilterBoolFunction(Card.IsRace,RACE_DRAGON+RACE_SPELLCASTER),1,true,true)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
......@@ -22,6 +22,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g1=Duel.SelectTarget(tp,s.thfilter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g2=Duel.SelectTarget(tp,Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g1,1,0,0)
......@@ -29,15 +30,13 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local _,hg=Duel.GetOperationInfo(0,CATEGORY_TOHAND)
local hc=hg:GetFirst()
local chk=hc:IsType(TYPE_RITUAL)
if hc:IsControler(tp) and hc:IsRelateToEffect(e)
local tg=Duel.GetTargetsRelateToChain()
local hc=e:GetLabelObject()
if hc and hc:IsControler(tp) and hc:IsRelateToEffect(e)
and Duel.SendtoHand(hc,nil,REASON_EFFECT)>0 and hc:IsLocation(LOCATION_HAND) then
local _,tg=Duel.GetOperationInfo(0,CATEGORY_CONTROL)
local tc=tg:GetFirst()
if tc:IsControler(1-tp) and tc:IsRelateToEffect(e)
and Duel.GetControl(tc,tp)>0 and not chk then
local tc=(tg-hc):GetFirst()
if tc and tc:IsControler(1-tp) and tc:IsRelateToEffect(e)
and Duel.GetControl(tc,tp)>0 and not hc:IsType(TYPE_RITUAL) then
local fid=c:GetFieldID()
tc:RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
......
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