Commit f7e43204 authored by mercury233's avatar mercury233

update scripts

parent 358ec404
pics/101104087.jpg

82.8 KB | W: | H:

pics/101104087.jpg

82.8 KB | W: | H:

pics/101104087.jpg
pics/101104087.jpg
pics/101104087.jpg
pics/101104087.jpg
  • 2-up
  • Swipe
  • Onion skin
--モーターシェル
--Sctipt By JSY1728
function c100200203.initial_effect(c)
--"Motor Token" Summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(1,100200203+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c100200203.tkcon)
e1:SetTarget(c100200203.tktg)
e1:SetOperation(c100200203.tkop)
c:RegisterEffect(e1)
end
function c100200203.tkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c100200203.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,100200303,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c100200203.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,100200303,0,TYPES_TOKEN_MONSTER,200,200,1,RACE_MACHINE,ATTRIBUTE_EARTH) then
local token=Duel.CreateToken(tp,100200303)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_ATTACK)
end
end
--ヨーウィー
--Script By JSY1728
function c100278007.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SPSUMMON_COUNT)
--Draw Phase Skip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278007,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,100278007+EFFECT_COUNT_CODE_DUEL)
e1:SetCost(c100278007.cost)
e1:SetCondition(c100278007.condition)
e1:SetOperation(c100278007.activate)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c100278007.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local sp=Duel.GetActivityCount(tp,ACTIVITY_SPSUMMON)
if chk==0 then return sp<=1 end
if sp==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_COUNT_LIMIT)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
end
function c100278007.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==1 and eg:IsContains(e:GetHandler())
end
function c100278007.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetCode(EFFECT_SKIP_DP)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,1)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
end
Duel.RegisterEffect(e1,tp)
end
--D-フォース
--Script by Chrono-Genex
function c100278009.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c100278009.activate)
c:RegisterEffect(e1)
--draw skip
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_DRAW)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0)
e2:SetCondition(c100278009.skipcon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_DRAW_COUNT)
e3:SetValue(0)
c:RegisterEffect(e3)
--cannot be target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_SET_AVAILABLE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetCondition(c100278009.condition)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetTarget(aux.TargetBoolFunction(Card.IsCode,83965310))
e5:SetValue(c100278009.atkval)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e6:SetValue(aux.indoval)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_EXTRA_ATTACK)
e7:SetValue(1)
c:RegisterEffect(e7)
end
function c100278009.thfilter(c)
return c:IsCode(83965310) and c:IsAbleToHand()
end
function c100278009.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100278009.thfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100278009,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c100278009.cfilter(c)
return c:IsFaceup() and c:IsCode(83965310)
end
function c100278009.condition(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c100278009.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
function c100278009.skipcon(e)
return c100278009.condition(e) and Duel.GetCurrentPhase()==PHASE_DRAW
end
function c100278009.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,0,LOCATION_GRAVE,LOCATION_GRAVE,nil,TYPE_MONSTER)*100
end
--ドクターD
--Script by Chrono-Genex
function c100278010.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278010,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c100278010.cost)
e1:SetTarget(c100278010.target)
e1:SetOperation(c100278010.activate)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278010,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100278010.atktg)
e2:SetOperation(c100278010.atkop)
c:RegisterEffect(e2)
end
function c100278010.costfilter(c,e,tp)
return c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingMatchingCard(c100278010.thfilter,tp,LOCATION_GRAVE,0,1,c,e,tp)
end
function c100278010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
if chk==0 then return Duel.IsExistingMatchingCard(c100278010.costfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100278010.costfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100278010.thfilter(c,e,tp)
if not (c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER)) then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end
function c100278010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local res=e:GetLabel()==1
e:SetLabel(0)
return res or Duel.IsExistingMatchingCard(c100278010.thfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
end
e:SetLabel(0)
end
function c100278010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100278010.thfilter),tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand()
and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100278010.atkfilter1(c,tp)
return c:IsFaceup() and c:IsSetCard(0xc008)
and Duel.IsExistingTarget(c100278010.atkfilter2,tp,LOCATION_MZONE,0,1,c,c)
end
function c100278010.atkfilter2(c,tc)
return c:IsFaceup() and c:IsSetCard(0xc008) and not c:IsAttack(tc:GetAttack())
end
function c100278010.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c100278010.atkfilter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100278010,2))
local g1=Duel.SelectTarget(tp,c100278010.atkfilter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
local tc=g1:GetFirst()
e:SetLabelObject(tc)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100278010.atkfilter2,tp,LOCATION_MZONE,0,1,1,tc,tc)
end
function c100278010.atkop(e,tp,eg,ep,ev,re,r,rp)
local hc=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc=g:GetFirst()
if tc==hc then tc=g:GetNext() end
if hc:IsFaceup() and hc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
hc:RegisterEffect(e1)
end
end
--氷結界
--Script by Chrono-Genex
function c100278013.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetTarget(c100278013.target)
e1:SetOperation(c100278013.activate)
c:RegisterEffect(e1)
--to grave
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278013,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_TOHAND+CATEGORY_GRAVE_ACTION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100278013)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100278013.tgtg)
e2:SetOperation(c100278013.tgop)
c:RegisterEffect(e2)
end
function c100278013.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetBattleMonster(1-tp)
if chk==0 then return tc and tc:IsRelateToBattle() end
end
function c100278013.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetBattleMonster(1-tp)
if tc:IsRelateToBattle() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_DISABLE_EFFECT)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
function c100278013.tgfilter(c)
return c:IsLevelAbove(5) and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c100278013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278013.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c100278013.thfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100278013.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c100278013.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_GRAVE) then
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100278013.thfilter),tp,LOCATION_GRAVE,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100278013,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTargetRange(1,0)
e1:SetTarget(c100278013.splimit)
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
function c100278013.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
--ピリ・レイスの地図
--Script by Chrono-Genex
function c100278023.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100278023.condition)
e1:SetTarget(c100278023.target)
e1:SetOperation(c100278023.activate)
c:RegisterEffect(e1)
end
function c100278023.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c100278023.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAttack(0) and c:IsAbleToHand()
end
function c100278023.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278023.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278023.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278023.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.SetLP(tp,math.ceil(Duel.GetLP(tp)/2))
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c100278023.aclimit)
e1:SetLabel(g:GetFirst():GetCode())
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetOperation(c100278023.regop)
e2:SetLabelObject(e1)
e2:SetLabel(g:GetFirst():GetCode())
e2:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e2,tp)
end
end
end
function c100278023.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
function c100278023.regop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
if tc:IsSummonPlayer(tp) and tc:IsCode(e:GetLabel()) then
e:GetLabelObject():Reset()
e:Reset()
end
end
--サイレンス・シーネットル
--Script by Chrono-Genex
function c100278029.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278029,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100278029)
e1:SetCondition(c100278029.spcon)
e1:SetCost(c100278029.spcost)
e1:SetTarget(c100278029.sptg)
e1:SetOperation(c100278029.spop)
c:RegisterEffect(e1)
--todeck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278029,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100278129)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c100278029.tdtg)
e2:SetOperation(c100278029.tdop)
c:RegisterEffect(e2)
Duel.AddCustomActivityCounter(100278029,ACTIVITY_SPSUMMON,c100278029.counterfilter)
end
function c100278029.counterfilter(c)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278029.cfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278029.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100278029.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100278029.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(100278029,tp,ACTIVITY_SPSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetTarget(c100278029.splimit)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c100278029.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278029.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100278029.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100278029.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToDeck()
end
function c100278029.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100278029.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278029.tdfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c100278029.tdfilter,tp,LOCATION_GRAVE,0,1,3,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c100278029.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()>0 then
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
--No.4 猛毒刺胞ステルス・クラーゲン
--Script by Chrono-Genex
function c100278030.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,2)
c:EnableReviveLimit()
--attribute
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(aux.TargetBoolFunction(Card.IsFaceup))
e1:SetValue(ATTRIBUTE_WATER)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278030,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCondition(c100278030.descon)
e2:SetTarget(c100278030.destg)
e2:SetOperation(c100278030.desop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278030,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100278030.spcon)
e3:SetTarget(c100278030.sptg)
e3:SetOperation(c100278030.spop)
c:RegisterEffect(e3)
end
c100278030.xyz_number=4
function c100278030.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100278030.desfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278030.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278030.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c100278030.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function c100278030.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c100278030.desfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if not tc then return end
local dam=math.floor(tc:GetAttack()/2)
if Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Damage(1-tp,dam,REASON_EFFECT)
end
end
function c100278030.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_XYZ) and ct>0
end
function c100278030.spfilter(c,e,tp)
return c:IsCode(100278031) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278030.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)>0
and Duel.IsExistingMatchingCard(c100278030.spfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c100278030.matfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanOverlay()
end
function c100278030.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCountFromEx(tp,tp,nil,TYPE_XYZ)
if ft<=0 then return end
ft=math.min(ft,e:GetLabel())
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local ect=c29724053 and Duel.IsPlayerAffectedByEffect(tp,29724053) and c29724053[tp]
if ect~=nil then ft=math.min(ft,ect) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c100278030.spfilter,tp,LOCATION_EXTRA,0,1,ft,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100278030.matfilter),tp,LOCATION_GRAVE,0,nil)
local res=false
local tc=og:GetFirst()
while tc do
if sg:GetCount()==0 then return end
if Duel.SelectEffectYesNo(tp,tc,aux.Stringid(100278030,2)) then
if res==false then
res=true
Duel.BreakEffect()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=sg:Select(tp,1,1,nil)
Duel.Overlay(tc,tg)
sg:Sub(tg)
end
tc=og:GetNext()
end
end
end
--ステルス・クラーゲン・エフィラ
--Script by Chrono-Genex
function c100278031.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),4,2)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278031,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetCondition(c100278031.descon)
e1:SetTarget(c100278031.destg)
e1:SetOperation(c100278031.desop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c100278031.regcon)
e2:SetOperation(c100278031.regop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278031,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(c100278031.spcon)
e3:SetTarget(c100278031.sptg)
e3:SetOperation(c100278031.spop)
c:RegisterEffect(e3)
end
function c100278031.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph==PHASE_MAIN1 or ph==PHASE_MAIN2
end
function c100278031.desfilter(c)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER)
end
function c100278031.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278031.desfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c100278031.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c100278031.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,c100278031.desfilter,tp,0,LOCATION_MZONE,1,1,nil):GetFirst()
if tc then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c100278031.regcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler():IsSetCard(0x48) and re:IsActiveType(TYPE_MONSTER)
end
function c100278031.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(100278031,RESET_EVENT+RESET_TURN_SET+RESET_TOHAND+RESET_TODECK+RESET_TOFIELD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(100278031,3))
end
function c100278031.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:SetLabel(ct)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetFlagEffect(100278031)>0 and ct>0
end
function c100278031.spfilter(c,e,tp)
return c:IsSetCard(0x269) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278031.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100278031.spfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100278031.matfilter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsCanOverlay()
end
function c100278031.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
ft=math.min(ft,e:GetLabel())
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100278031.spfilter),tp,LOCATION_GRAVE,0,1,ft,e:GetHandler(),e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
local og=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_MZONE)
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c100278031.matfilter),tp,LOCATION_GRAVE,0,nil)
local res=false
local tc=og:GetFirst()
while tc do
if sg:GetCount()==0 then return end
if Duel.SelectEffectYesNo(tp,tc,aux.Stringid(100278031,2)) then
if res==false then
res=true
Duel.BreakEffect()
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local tg=sg:Select(tp,1,1,nil)
Duel.Overlay(tc,tg)
sg:Sub(tg)
end
tc=og:GetNext()
end
end
end
--ヌメロン・ストーム
--Numeron Storm
--Script By JSY1728
function c100278032.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c100278032.descon)
e1:SetTarget(c100278032.destg)
e1:SetOperation(c100278032.desop)
c:RegisterEffect(e1)
end
function c100278032.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x268)
end
function c100278032.descon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100278032.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c100278032.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c100278032.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100278032.desfilter,tp,0,LOCATION_ONFIELD,1,c) end
local sg=Duel.GetMatchingGroup(c100278032.desfilter,tp,0,LOCATION_ONFIELD,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,sg,sg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1000)
end
function c100278032.desop(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c100278032.desfilter,tp,0,LOCATION_ONFIELD,aux.ExceptThisCard(e))
if Duel.Destroy(sg,REASON_EFFECT)>0 then
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
--人形の家
--scripted by XyLeN & mercury233
function c100278033.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278033,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_FZONE)
e1:SetCountLimit(1,100278033)
e1:SetTarget(c100278033.sptg)
e1:SetOperation(c100278033.spop)
c:RegisterEffect(e1)
--attach
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278033,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(c100278033.matcon)
e2:SetTarget(c100278033.mattg)
e2:SetOperation(c100278033.matop)
c:RegisterEffect(e2)
end
function c100278033.filter(c,e,tp)
return c:IsType(TYPE_NORMAL) and (c:IsAttack(0) or c:IsDefense(0)) and c:IsCanBeEffectTarget(e)
and Duel.IsExistingMatchingCard(c100278033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,c:GetCode(),nil)
end
function c100278033.spfilter(c,e,tp,code,code2)
return c:IsCode(code,code2) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278033.cfilter(c)
return c:IsFaceup() and c:IsCode(75574498)
end
function c100278033.gcheck(sg,e,tp)
if #sg==1 then return true end
local code1=sg:GetFirst():GetCode()
local code2=sg:GetNext():GetCode()
local tg=Duel.GetMatchingGroup(c100278033.spfilter,tp,LOCATION_DECK,0,nil,e,tp,code1,code2)
return tg:CheckSubGroup(aux.gfcheck,2,2,Card.IsCode,code1,code2)
end
function c100278033.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100278033.filter(chkc,e,tp) end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>0 and Duel.IsExistingTarget(c100278033.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
local ct=math.min(2,ft)
if Duel.IsPlayerAffectedByEffect(tp,59822133)
or not Duel.IsExistingMatchingCard(c100278033.cfilter,tp,LOCATION_MZONE,0,1,nil) then ct=1 end
local g=Duel.GetMatchingGroup(c100278033.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=g:SelectSubGroup(tp,c100278033.gcheck,false,1,ct,e,tp)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,#tg,tp,LOCATION_DECK)
end
function c100278033.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local code1,code2
local tc=tg:GetFirst()
while tc do
if Duel.IsExistingMatchingCard(c100278033.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp,tc:GetCode(),nil) then
if code1==nil then code1=tc:GetCode() else code2=tc:GetCode() end
end
tc=tg:GetNext()
end
if code1==nil then return end
local sg
if Duel.IsPlayerAffectedByEffect(tp,59822133) or ft==1 or code2==nil then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=Duel.SelectMatchingCard(tp,c100278033.spfilter,tp,LOCATION_DECK,0,1,1,sg,e,tp,code1,code2)
else
local g=Duel.GetMatchingGroup(c100278033.spfilter,tp,LOCATION_DECK,0,nil,e,tp,code1,code2)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=g:SelectSubGroup(tp,aux.gfcheck,2,2,false,Card.IsCode,code1,code2)
end
local sc=sg:GetFirst()
while sc do
Duel.SpecialSummonStep(sc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(sc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(6)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=Effect.CreateEffect(sc)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(ATTRIBUTE_DARK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e2)
sc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
function c100278033.matcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c100278033.matfilter(c)
return c:IsCode(44190146) and c:IsFaceup() and c:IsCanOverlay()
end
function c100278033.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278033.matfilter,tp,LOCATION_MZONE,0,1,nil)
and Duel.IsExistingMatchingCard(c100278033.cfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c100278033.matop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g1=Duel.SelectMatchingCard(tp,c100278033.matfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g1:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g2=Duel.SelectMatchingCard(tp,c100278033.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g2:GetFirst()
if tc and Duel.Overlay(tc,g1)~=0 then
Duel.BreakEffect()
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end
end
end
--光波複葉機
--Script by Chrono-Genex
function c100278038.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278038,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,100278038)
e1:SetCondition(c100278038.spcon)
e1:SetTarget(c100278038.sptg)
e1:SetOperation(c100278038.spop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--lv
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278038,1))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetTarget(c100278038.lvtg)
e3:SetOperation(c100278038.lvop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100278038,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetCountLimit(1,100278138)
e4:SetCondition(c100278038.thcon)
e4:SetCost(c100278038.thcost)
e4:SetTarget(c100278038.thtg)
e4:SetOperation(c100278038.thop)
c:RegisterEffect(e4)
end
function c100278038.cfilter(c,tp)
return c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0xe5)
end
function c100278038.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100278038.cfilter,1,nil,tp)
end
function c100278038.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c100278038.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c100278038.lvfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe5) and not c:IsLevel(8) and c:IsLevelAbove(1)
end
function c100278038.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278038.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278038.lvfilter,tp,LOCATION_MZONE,0,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c100278038.lvfilter,tp,LOCATION_MZONE,0,2,2,nil)
end
function c100278038.tgfilter(c,e)
return c:IsFaceup() and c:IsRelateToEffect(e)
end
function c100278038.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c100278038.tgfilter,nil,e)
if g:GetCount()<=0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(8)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c100278038.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c100278038.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() and c:IsLocation(LOCATION_GRAVE) end
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
function c100278038.thfilter(c)
return c:IsSetCard(0xe5) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100278038.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278038.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100278038.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100278038.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--光波干渉
--Script by Chrono-Genex
function c100278039.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278039,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100278039)
e2:SetCondition(c100278039.atkcon)
e2:SetOperation(c100278039.atkop)
c:RegisterEffect(e2)
end
function c100278039.cfilter(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c100278039.atkcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetBattleMonster(tp)
if not tc then return false end
e:SetLabelObject(tc)
return tc:IsFaceup() and tc:IsSetCard(0xe5)
and Duel.IsExistingMatchingCard(c100278039.cfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,tc,tc:GetCode())
end
function c100278039.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:IsRelateToBattle() and tc:IsControler(tp) and tc:IsFaceup() and tc:IsSetCard(0xe5) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1)
end
end
--二重露光
--Script by Chrono-Genex
function c100278040.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--lv
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278040,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,100278040)
e2:SetTarget(c100278040.lvtg)
e2:SetOperation(c100278040.lvop)
c:RegisterEffect(e2)
--name
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278040,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,100278140)
e3:SetTarget(c100278040.nametg)
e3:SetOperation(c100278040.nameop)
c:RegisterEffect(e3)
end
function c100278040.lvfilter(c)
return c:IsFaceup() and c:IsLevelBelow(6)
end
function c100278040.fselect(g)
return g:GetClassCount(Card.GetCode)==1
end
function c100278040.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c100278040.lvfilter,tp,LOCATION_MZONE,0,nil)
if chkc then return false end
if chk==0 then return g:CheckSubGroup(c100278040.fselect,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local sg=g:SelectSubGroup(tp,c100278040.fselect,false,2,2)
Duel.SetTargetCard(sg)
end
function c100278040.tgfilter(c,e)
return c:IsFaceup() and c:IsRelateToEffect(e)
end
function c100278040.lvop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c100278040.tgfilter,nil,e)
if g:GetCount()<=0 then return end
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel()*2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c100278040.namefilter(c,code)
return c:IsFaceup() and not c:IsCode(code)
end
function c100278040.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xe5)
and Duel.IsExistingMatchingCard(c100278040.namefilter,0,LOCATION_MZONE,LOCATION_MZONE,1,c,c:GetCode())
end
function c100278040.nametg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100278040.cfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100278040.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100278040,2))
Duel.SelectTarget(tp,c100278040.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c100278040.nameop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local code=tc:GetCode()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(100278040,3))
local g=Duel.SelectMatchingCard(tp,c100278040.namefilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,tc,code)
local sc=g:GetFirst()
if sc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetValue(tc:GetCode())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
sc:RegisterEffect(e1)
end
end
end
--扇風機塊プロペライオン
--Script by Chrono-Genex
function c100278043.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x14b),1,1)
c:EnableReviveLimit()
--cannot link material
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(c100278043.lmlimit)
c:RegisterEffect(e1)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100278043,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c100278043.atkcon1)
e3:SetTarget(c100278043.atktg)
e3:SetOperation(c100278043.atkop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(100278043,1))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c100278043.atkcon2)
e4:SetTarget(c100278043.atktg)
e4:SetOperation(c100278043.atkop)
c:RegisterEffect(e4)
end
function c100278043.lmlimit(e)
local c=e:GetHandler()
return c:IsStatus(STATUS_SPSUMMON_TURN) and c:IsSummonType(SUMMON_TYPE_LINK)
end
function c100278043.atkcon1(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return e:GetHandler():GetMutualLinkedGroupCount()>0 and d and a:GetControler()~=d:GetControler()
end
function c100278043.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetBattleMonster(1-tp)
if chk==0 then return tc and not tc:IsAttack(0) end
end
function c100278043.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetBattleMonster(1-tp)
if tc and tc:IsFaceup() and tc:IsRelateToBattle() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE_CAL)
tc:RegisterEffect(e1)
end
end
function c100278043.atkcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:GetMutualLinkedGroupCount()==0 and bc and bc:IsControler(1-tp)
end
--機塊コンバート
--Script by Chrono-Genex
function c100278044.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100278044,0))
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c100278044.target)
e1:SetOperation(c100278044.activate)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100278044,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100278044)
e2:SetCondition(aux.exccon)
e2:SetCost(c100278044.thcost)
e2:SetTarget(c100278044.thtg)
e2:SetOperation(c100278044.thop)
c:RegisterEffect(e2)
end
function c100278044.filter(c)
return c:IsSetCard(0x14b) and c:IsType(TYPE_LINK) and c:GetSequence()<5 and c:IsAbleToRemove()
end
function c100278044.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100278044.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c100278044.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c100278044.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x14b) and c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100278044.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c100278044.filter,tp,LOCATION_MZONE,0,nil)
if Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0 then
local ct=Duel.GetOperatedGroup():Filter(Card.IsLocation,nil,LOCATION_REMOVED):GetCount()
local sg=Duel.GetMatchingGroup(c100278044.spfilter,tp,LOCATION_REMOVED,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
ct=math.min(ct,ft)
if ct>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100278044,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,ct,nil)
Duel.SpecialSummon(tg,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function c100278044.costfilter(c)
return c:IsSetCard(0x14b) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToRemoveAsCost()
end
function c100278044.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c100278044.costfilter,tp,LOCATION_GRAVE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100278044.costfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c100278044.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c100278044.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--Proof of Pruflas
--scripted by XyleN
function c101104081.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101104081)
e1:SetCondition(c101104081.spcon)
e1:SetTarget(c101104081.sptg)
e1:SetOperation(c101104081.spop)
c:RegisterEffect(e1)
--tribute summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104081,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetTarget(c101104081.sumtg)
e2:SetOperation(c101104081.sumop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101104081.cfilter(c)
return c:IsSummonType(SUMMON_TYPE_SPECIAL)
end
function c101104081.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101104081.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101104081.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101104081.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
end
function c101104081.sumfilter(c)
return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1)
end
function c101104081.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104081.sumfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,nil,1,0,0)
end
function c101104081.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SUMMON)
local g=Duel.SelectMatchingCard(tp,c101104081.sumfilter,tp,LOCATION_HAND,0,1,1,nil)
local tc=g:GetFirst()
if tc then
local s1=tc:IsSummonable(true,nil,1)
local s2=tc:IsMSetable(true,nil,1)
if (s1 and s2 and Duel.SelectPosition(tp,tc,POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)==POS_FACEUP_ATTACK) or not s2 then
Duel.Summon(tp,tc,true,nil,1)
else
Duel.MSet(tp,tc,true,nil,1)
end
end
end
--Thron the Disciplined Angel
--scripted by XyleN
function c101104082.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104082,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101104082)
e1:SetCondition(c101104082.condition)
e1:SetTarget(c101104082.target)
e1:SetOperation(c101104082.operation)
c:RegisterEffect(e1)
end
function c101104082.filter(c,tp)
return c:GetOriginalAttribute()==ATTRIBUTE_EARTH and c:GetOriginalRace()==RACE_FAIRY
and c:IsPreviousLocation(LOCATION_HAND+LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c101104082.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101104082.filter,1,nil,tp)
end
function c101104082.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101104082.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--Pendransaction
--scripted by XyleN
function c101104083.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--apply effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104083,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101104083)
e1:SetCost(c101104083.cost)
e1:SetTarget(c101104083.target)
e1:SetOperation(c101104083.operation)
c:RegisterEffect(e1)
end
function c101104083.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c101104083.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
if chk==0 then
if ct>=10 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil) end
return ct>0
end
if ct>=10 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_ONFIELD)
end
end
function c101104083.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)
if ct>=1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e1)
end
if ct>=5 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
c:RegisterEffect(e2)
end
if ct>=10 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,1,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
if ct>=15 then
Duel.SetLP(1-tp,3000)
end
end
--Expendable Dai
--scripted by XyleN
function c101104084.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101104084.cost)
e1:SetTarget(c101104084.target)
e1:SetOperation(c101104084.activate)
c:RegisterEffect(e1)
end
function c101104084.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c101104084.desfilter(c,tc,ec)
return c:GetEquipTarget()~=tc and c~=ec
end
function c101104084.cfilter(c,ec,tp)
if not c:IsRace(RACE_WARRIOR) then return false end
return Duel.IsExistingTarget(c101104084.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c,c,ec)
end
function c101104084.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsOnField() and chkc~=c end
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c101104084.cfilter,1,c,c,tp)
and Duel.IsPlayerCanDraw(tp,1)
else
return Duel.IsExistingTarget(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
and Duel.IsPlayerCanDraw(tp,1)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(tp,c101104084.cfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101104084.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--Terrors of the Underroot
--scripted by XyleN
function c101104085.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101104085+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101104085.target)
e1:SetOperation(c101104085.activate)
c:RegisterEffect(e1)
end
function c101104085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
and Duel.IsExistingTarget(Card.IsAbleToGrave,tp,0,LOCATION_REMOVED,1,nil) end
local rt=Duel.GetTargetCount(aux.TRUE,tp,0,LOCATION_REMOVED,nil)
if rt>5 then rt=5 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,rt,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g2=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,0,LOCATION_REMOVED,#g1,#g1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,#g1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g2,#g2,0,0)
end
function c101104085.filter(c,loc,e)
return c:IsLocation(loc) and c:IsRelateToEffect(e)
end
function c101104085.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tg1=g:Filter(c101104085.filter,nil,LOCATION_GRAVE,e)
local tg2=g:Filter(c101104085.filter,nil,LOCATION_REMOVED,e)
if Duel.Remove(tg1,POS_FACEUP,REASON_EFFECT)>0 then
Duel.SendtoGrave(tg2,REASON_EFFECT+REASON_RETURN)
end
end
--War Rock Wento
--Script by XyLeN
function c101104086.initial_effect(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104086,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101104086)
e1:SetCondition(c101104086.atkcon)
e1:SetCost(c101104086.atkcost)
e1:SetOperation(c101104086.atkop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104086,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101104086+100)
e2:SetCondition(c101104086.spcon)
e2:SetTarget(c101104086.sptg)
e2:SetOperation(c101104086.spop)
c:RegisterEffect(e2)
end
function c101104086.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a,d=Duel.GetBattleMonster(tp)
return a and d and a:IsAttribute(ATTRIBUTE_EARTH) and a:IsRace(RACE_WARRIOR)
end
function c101104086.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,800) end
Duel.PayLPCost(tp,800)
end
function c101104086.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetBattleMonster(tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
function c101104086.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101104086.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x15f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101104086.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101104086.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101104086.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101104086.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--War Rock Mammud
--Script By JSY1728
function c101104087.initial_effect(c)
--Tribute Summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104087,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c101104087.tscon)
e1:SetValue(1)
c:RegisterEffect(e1)
--ATK UP
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104087,1))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_BATTLED)
e2:SetCountLimit(1,101104087)
e2:SetTarget(c101104087.dstg)
e2:SetOperation(c101104087.dsop)
c:RegisterEffect(e2)
end
function c101104087.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_WARRIOR)
end
function c101104087.tscon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(c101104087.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c101104087.check(c,tp)
return c and c:IsControler(tp) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101104087.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (c101104087.check(Duel.GetAttacker(),tp) or c101104087.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingTarget(Card.IsType,tp,0,LOCATION_ONFIELD,1,nil,TYPE_SPELL+TYPE_TRAP) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_SPELL+TYPE_TRAP)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101104087.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
end
function c101104087.dsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.BreakEffect()
local ag=Duel.GetMatchingGroup(c101104087.atkfilter,tp,LOCATION_MZONE,0,nil)
for tc2 in aux.Next(ag) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc2:RegisterEffect(e1)
end
end
end
--War Rock Meteoragon
--scripted by XyleN
function c101104088.initial_effect(c)
--indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(aux.indoval)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101104088,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101104088.discon)
e2:SetTarget(c101104088.distg)
e2:SetOperation(c101104088.disop)
c:RegisterEffect(e2)
--twice attack
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101104088,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1)
e3:SetCondition(c101104088.atkcon)
e3:SetTarget(c101104088.atktg)
e3:SetOperation(c101104088.atkop)
c:RegisterEffect(e3)
--
if not c101104088.global_check then
c101104088.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLE_CONFIRM)
ge1:SetOperation(c101104088.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101104088.check(c)
return c and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101104088.checkop(e,tp,eg,ep,ev,re,r,rp)
local c0,c1=Duel.GetBattleMonster(0)
if c101104088.check(c0) then
Duel.RegisterFlagEffect(0,101104088,RESET_PHASE+PHASE_END,0,1)
end
if c101104088.check(c1) then
Duel.RegisterFlagEffect(1,101104088,RESET_PHASE+PHASE_END,0,1)
end
end
function c101104088.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=c:GetBattleTarget()
e:SetLabelObject(ac)
return ac and ac:IsFaceup() and ac:IsControler(1-tp)
end
function c101104088.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local ac=e:GetLabelObject()
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,ac,1,0,0)
end
function c101104088.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=e:GetLabelObject()
if ac:IsFaceup() and ac:IsRelateToBattle() and not ac:IsStatus(STATUS_DISABLED) and not ac:IsImmuneToEffect(e) and ac:IsControler(1-tp) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ac:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
ac:RegisterEffect(e2)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c101104088.distg2)
e3:SetLabelObject(ac)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_CHAIN_SOLVING)
e4:SetCondition(c101104088.discon2)
e4:SetOperation(c101104088.disop2)
e4:SetLabelObject(ac)
e4:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e4,tp)
end
end
function c101104088.distg2(e,c)
local ac=e:GetLabelObject()
return c:IsOriginalCodeRule(ac:GetOriginalCodeRule())
end
function c101104088.discon2(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabelObject()
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsOriginalCodeRule(ac:GetOriginalCodeRule())
end
function c101104088.disop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c101104088.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101104088)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE) and aux.dscon()
end
function c101104088.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
end
function c101104088.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101104088.atkfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function c101104088.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c101104088.atkfilter,tp,LOCATION_MZONE,0,nil)
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
if c:IsRelateToEffect(e) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EFFECT_EXTRA_ATTACK_MONSTER)
e2:SetValue(1)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e2)
end
end
--War Rock Dignity
--Script By JSY1728 & mercury233
function c101104089.initial_effect(c)
--Negate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101104089,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,101104089+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101104089.actcon)
e1:SetTarget(c101104089.acttg)
e1:SetOperation(c101104089.actop)
c:RegisterEffect(e1)
end
function c101104089.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x15f)
end
function c101104089.actcon(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainDisablable(ev) then return false end
if not Duel.IsExistingMatchingCard(c101104089.cfilter,tp,LOCATION_MZONE,0,1,nil) then return false end
return (re:IsActiveType(TYPE_MONSTER) and re:GetHandler():IsControler(1-tp))
or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and ep==1-tp)
end
function c101104089.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c101104089.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--War Rock Spirit
--scripted by XyleN & mercury233
function c101104090.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101104090+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101104090.condition)
e1:SetTarget(c101104090.target)
e1:SetOperation(c101104090.activate)
c:RegisterEffect(e1)
end
function c101104090.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c101104090.afilter(c,e,tp)
return c:IsSetCard(0x15f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK)
end
function c101104090.dfilter(c,e,tp)
return c:IsSetCard(0x15f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c101104090.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
local op=e:GetLabel()
return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE)
and (op==0 and c101104090.afilter(chkc,e,tp) or op==1 and c101104090.dfilter(chkc,e,tp))
end
local b1=Duel.IsExistingTarget(c101104090.afilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
local b2=Duel.IsExistingTarget(c101104090.dfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (b1 or b2) end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(101104090,0),aux.Stringid(101104090,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(101104090,0))
else
op=Duel.SelectOption(tp,aux.Stringid(101104090,1))+1
end
e:SetLabel(op)
local filter=c101104090.afilter
if op==1 then filter=c101104090.dfilter end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101104090.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local op=e:GetLabel()
if tc:IsRelateToEffect(e) then
if op==0 then
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_ATTACK)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e3)
Duel.SpecialSummonComplete()
else
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
end
if op==1 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c101104090.indtg)
e1:SetValue(c101104090.indct)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101104090.indtg(e,c)
return c:IsFaceup() and c:IsSetCard(0x15f)
end
function c101104090.indct(e,re,r,rp)
if bit.band(r,REASON_BATTLE)~=0 then
return 1
else return 0 end
end
--War Rock Generations
--Script By JSY1728
function c101104091.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101104091+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101104091.condition)
e1:SetTarget(c101104091.target)
e1:SetOperation(c101104091.operation)
c:RegisterEffect(e1)
end
function c101104091.condition(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)
end
function c101104091.filter(c,e,tp)
return c:IsSetCard(0x15f) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101104091.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101104091.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101104091.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101104091.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0
and Duel.GetTurnPlayer()==1-tp then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(c101104091.atklimit)
tc:RegisterEffect(e1)
end
end
function c101104091.atklimit(e,c)
return c~=e:GetHandler()
end
--War Rock Big Blow
--Script by JSY1728
function c101104092.initial_effect(c)
--Destroy
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_LEAVE_FIELD)
e1:SetCountLimit(1,101104092+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101104092.descon)
e1:SetTarget(c101104092.destg)
e1:SetOperation(c101104092.desop)
c:RegisterEffect(e1)
end
function c101104092.cfilter(c,tp,rp)
return c:IsSetCard(0x15f) and c:IsPreviousPosition(POS_FACEUP) and c:GetPreviousControler()==tp
and c:IsPreviousLocation(LOCATION_MZONE) and rp==1-tp and c:IsReason(REASON_EFFECT)
end
function c101104092.descon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) and eg:IsExists(c101104092.cfilter,1,nil,tp,rp)
end
function c101104092.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,1-tp,LOCATION_ONFIELD)
end
function c101104092.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,2,nil)
if #g>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
end
......@@ -89,6 +89,7 @@ function c101106203.activate(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetValue(c101106203.immval)
tc:RegisterEffect(e2,true)
tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101106203,3))
end
end
function c101106203.descheck(g,mg2,dg)
......
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