Commit dc5e181a authored by mercury233's avatar mercury233

update

parent 8449344a
#created by ... #created by ...
#main #main
101104079
101104018 101104018
101104031 101104031
101104063 101104063
...@@ -41,6 +42,7 @@ ...@@ -41,6 +42,7 @@
101104208 101104208
101104209 101104209
#extra #extra
101104047
101104037 101104037
101104042 101104042
101104048 101104048
......
--パジェストマ・カンブロラスター
--Scripted by mallu11
function c101104047.initial_effect(c)
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0xd4),2,2)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101104047.efilter)
c:RegisterEffect(e1)
--to grave/set card
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104047,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101104047)
e2:SetTarget(c101104047.settg)
e2:SetOperation(c101104047.setop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e3:SetCountLimit(1,101104147)
e3:SetTarget(c101104047.desreptg)
e3:SetValue(c101104047.desrepval)
e3:SetOperation(c101104047.desrepop)
c:RegisterEffect(e3)
end
function c101104047.efilter(e,re)
return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner()
end
function c101104047.cfilter(c,tp)
return c:GetSequence()<5 and c:IsFacedown() and c:IsAbleToGrave() and Duel.IsExistingMatchingCard(c101104047.setfilter,tp,LOCATION_DECK,0,1,nil,c,tp)
end
function c101104047.setfilter(c,mc,tp)
if not (c:IsSetCard(0xd4) and c:IsType(TYPE_TRAP)) then return false end
if not mc or mc:IsControler(1-tp) then
return c:IsSSetable()
else
return c:IsSSetable(true)
end
end
function c101104047.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c101104047.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101104047.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c101104047.cfilter,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c101104047.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c101104047.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local sc=g:GetFirst()
if sc and Duel.SSet(tp,sc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
end
end
end
function c101104047.repfilter(c,tp)
return c:IsFacedown() and c:IsControler(tp) and c:IsOnField() and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end
function c101104047.desreptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return eg:IsExists(c101104047.repfilter,1,c,tp) and c:IsAbleToRemove() and not c:IsStatus(STATUS_DESTROY_CONFIRMED) end
return Duel.SelectEffectYesNo(tp,c,96)
end
function c101104047.desrepval(e,c)
return c101104047.repfilter(c,e:GetHandlerPlayer())
end
function c101104047.desrepop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT+REASON_REPLACE)
end
--ブービーゲーム
--Booby game
--Scripted コハナ(Kohana)
function c101104079.initial_effect(c)
--If a monster(s) battles, you take no damage from that battle
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104079,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c101104079.atcon)
e1:SetOperation(c101104079.atop)
c:RegisterEffect(e1)
--If face-down card is destroyed: you can set up to 2 Trap cards
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104079,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101104079)
e2:SetCondition(c101104079.setcon)
e2:SetTarget(c101104079.settg)
e2:SetOperation(c101104079.setop)
c:RegisterEffect(e2)
end
function c101104079.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetBattleDamage(tp)>0
end
function c101104079.atop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e1,tp)
end
function c101104079.setcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return bit.band(r,REASON_DESTROY+REASON_EFFECT)==REASON_DESTROY+REASON_EFFECT and rp==1-tp and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEDOWN)
end
function c101104079.setfilter(c)
return c:GetType()==TYPE_TRAP and not c:IsCode(101104079) and c:IsSSetable()
end
function c101104079.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101104079.setfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101104079.setfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,c101104079.setfilter,tp,LOCATION_GRAVE,0,1,2,nil)
end
function c101104079.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.SSet(tp,tg)
for tc in aux.Next(tg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
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