Commit af824bdf authored by argon.sun's avatar argon.sun

new scripts

parent 4ea21f25
...@@ -66,6 +66,7 @@ void Game::DrawBackGround() { ...@@ -66,6 +66,7 @@ void Game::DrawBackGround() {
matManager.mTexture.setTexture(0, imageManager.tField); matManager.mTexture.setTexture(0, imageManager.tField);
driver->setMaterial(matManager.mTexture); driver->setMaterial(matManager.mTexture);
driver->drawVertexPrimitiveList(matManager.vField, 4, matManager.iRectangle, 2); driver->drawVertexPrimitiveList(matManager.vField, 4, matManager.iRectangle, 2);
driver->setMaterial(matManager.mBackLine);
//select field //select field
if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD) { if(dInfo.curMsg == MSG_SELECT_PLACE || dInfo.curMsg == MSG_SELECT_DISFIELD) {
float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f}; float cv[4] = {0.0f, 0.0f, 1.0f, 1.0f};
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include <dirent.h> #include <dirent.h>
#endif #endif
const unsigned short PRO_VERSION = 0x12b1; const unsigned short PRO_VERSION = 0x12c0;
namespace ygo { namespace ygo {
......
...@@ -1105,9 +1105,10 @@ int32 scriptlib::duel_calculate_damage(lua_State *L) { ...@@ -1105,9 +1105,10 @@ int32 scriptlib::duel_calculate_damage(lua_State *L) {
check_param(L, PARAM_TYPE_CARD, 2); check_param(L, PARAM_TYPE_CARD, 2);
card* attacker = *(card**)lua_touserdata(L, 1); card* attacker = *(card**)lua_touserdata(L, 1);
card* attack_target = *(card**)lua_touserdata(L, 2); card* attack_target = *(card**)lua_touserdata(L, 2);
int32 skip_timing = lua_toboolean(L, 3);
if(attacker == attack_target) if(attacker == attack_target)
return 0; return 0;
attacker->pduel->game_field->add_process(PROCESSOR_DAMAGE_STEP, 0, (effect*)attacker, (group*)attack_target, 0, 0); attacker->pduel->game_field->add_process(PROCESSOR_DAMAGE_STEP, 0, (effect*)attacker, (group*)attack_target, 0, skip_timing);
return lua_yield(L, 0); return lua_yield(L, 0);
} }
int32 scriptlib::duel_get_battle_damage(lua_State *L) { int32 scriptlib::duel_get_battle_damage(lua_State *L) {
......
...@@ -3399,7 +3399,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3399,7 +3399,7 @@ int32 field::process_battle_command(uint16 step) {
raise_event((card*)0, EVENT_BATTLE_END, 0, 0, PLAYER_NONE, 0, 0); raise_event((card*)0, EVENT_BATTLE_END, 0, 0, PLAYER_NONE, 0, 0);
process_single_event(); process_single_event();
process_instant_event(); process_instant_event();
if(!core.effect_damage_step || core.current_chain.size() <= 1) { if(!core.effect_damage_step || ((core.effect_damage_step != 3) && (core.current_chain.size() <= 1))) {
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, TRUE); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, TRUE);
core.units.begin()->arg1 = 1; core.units.begin()->arg1 = 1;
} else { } else {
...@@ -3420,7 +3420,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3420,7 +3420,7 @@ int32 field::process_battle_command(uint16 step) {
process_single_event(); process_single_event();
process_instant_event(); process_instant_event();
} }
if(!core.effect_damage_step || core.current_chain.size() <= 1) { if(!core.effect_damage_step || ((core.effect_damage_step != 3) && (core.current_chain.size() <= 1))) {
if(core.flip_chain.size() || core.new_fchain.size() || core.new_ochain.size()) if(core.flip_chain.size() || core.new_fchain.size() || core.new_ochain.size())
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE);
} else { } else {
...@@ -3474,7 +3474,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3474,7 +3474,7 @@ int32 field::process_battle_command(uint16 step) {
core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE); core.attacker->set_status(STATUS_BATTLE_DESTROYED, FALSE);
if(core.attack_target) if(core.attack_target)
core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE); core.attack_target->set_status(STATUS_BATTLE_DESTROYED, FALSE);
if(!core.effect_damage_step || core.current_chain.size() <= 1) { if(!core.effect_damage_step || ((core.effect_damage_step != 3) && (core.current_chain.size() <= 1))) {
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE); add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, FALSE, FALSE);
core.units.begin()->step = 38; core.units.begin()->step = 38;
} else { } else {
...@@ -3537,7 +3537,7 @@ int32 field::process_damage_step(uint16 step) { ...@@ -3537,7 +3537,7 @@ int32 field::process_damage_step(uint16 step) {
core.units.begin()->ptarget = (group*)tmp; core.units.begin()->ptarget = (group*)tmp;
core.units.begin()->arg1 = infos.phase; core.units.begin()->arg1 = infos.phase;
if(core.attacker->current.location != LOCATION_MZONE || core.attack_target->current.location != LOCATION_MZONE) { if(core.attacker->current.location != LOCATION_MZONE || core.attack_target->current.location != LOCATION_MZONE) {
core.units.begin()->step = 1; core.units.begin()->step = 2;
return FALSE; return FALSE;
} }
pduel->write_buffer8(MSG_ATTACK); pduel->write_buffer8(MSG_ATTACK);
...@@ -3550,6 +3550,13 @@ int32 field::process_damage_step(uint16 step) { ...@@ -3550,6 +3550,13 @@ int32 field::process_damage_step(uint16 step) {
core.pre_field[1] = core.attack_target->fieldid_r; core.pre_field[1] = core.attack_target->fieldid_r;
else else
core.pre_field[1] = 0; core.pre_field[1] = 0;
if(core.attack_target->is_position(POS_FACEDOWN)) {
change_position(core.attack_target, 0, PLAYER_NONE, core.attack_target->current.position >> 1, 0, TRUE);
adjust_all();
}
return FALSE;
}
case 1: {
infos.phase = PHASE_DAMAGE_CAL; infos.phase = PHASE_DAMAGE_CAL;
raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0);
if(core.attack_target) if(core.attack_target)
...@@ -3558,24 +3565,27 @@ int32 field::process_damage_step(uint16 step) { ...@@ -3558,24 +3565,27 @@ int32 field::process_damage_step(uint16 step) {
process_single_event(); process_single_event();
process_instant_event(); process_instant_event();
add_process(PROCESSOR_BATTLE_COMMAND, 26, 0, 0, 0, 0); add_process(PROCESSOR_BATTLE_COMMAND, 26, 0, 0, 0, 0);
if(core.current_chain.size() > 1) { if(core.current_chain.size() > 1 || core.units.begin()->arg2) { //skip timing
core.units.begin()->step = 1; core.units.begin()->step = 2;
core.effect_damage_step = 3;
add_process(PROCESSOR_BATTLE_COMMAND, 27, 0, 0, 0, 0);
return FALSE; return FALSE;
} else { } else {
core.units.begin()->step = 1; core.units.begin()->step = 2;
core.reserved = core.units.front(); core.reserved = core.units.front();
return TRUE; return TRUE;
} }
} }
case 1: { case 2: {
core.effect_damage_step = 2; core.effect_damage_step = 2;
add_process(PROCESSOR_BATTLE_COMMAND, 27, 0, 0, 0, 0); add_process(PROCESSOR_BATTLE_COMMAND, 27, 0, 0, 0, 0);
return FALSE; return FALSE;
} }
case 2: { case 3: {
core.attacker = (card*)core.units.begin()->peffect; core.attacker = (card*)core.units.begin()->peffect;
core.attack_target = (card*)core.units.begin()->ptarget; core.attack_target = (card*)core.units.begin()->ptarget;
core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE); if(core.attacker)
core.attacker->set_status(STATUS_ATTACK_CANCELED, TRUE);
if(core.attack_target) if(core.attack_target)
core.attack_target->set_status(STATUS_ATTACK_CANCELED, TRUE); core.attack_target->set_status(STATUS_ATTACK_CANCELED, TRUE);
core.effect_damage_step = 0; core.effect_damage_step = 0;
...@@ -4175,8 +4185,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) { ...@@ -4175,8 +4185,7 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
case 10: { case 10: {
card* pcard = cait->triggering_effect->handler; card* pcard = cait->triggering_effect->handler;
if(cait->target_cards && cait->target_cards->container.size()) { if(cait->target_cards && cait->target_cards->container.size()) {
card_set::iterator cit; for(auto cit = cait->target_cards->container.begin(); cit != cait->target_cards->container.end(); ++cit)
for(cit = cait->target_cards->container.begin(); cit != cait->target_cards->container.end(); ++cit)
(*cit)->release_relation(cait->triggering_effect); (*cit)->release_relation(cait->triggering_effect);
} }
if((pcard->data.type & TYPE_EQUIP) && (cait->triggering_effect->type & EFFECT_TYPE_ACTIVATE) if((pcard->data.type & TYPE_EQUIP) && (cait->triggering_effect->type & EFFECT_TYPE_ACTIVATE)
...@@ -4206,9 +4215,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) { ...@@ -4206,9 +4215,8 @@ int32 field::solve_chain(uint16 step, uint32 skip_new) {
return FALSE; return FALSE;
} }
case 11: { case 11: {
card_set::iterator cit, rm; for(auto cit = core.leave_confirmed.begin(); cit != core.leave_confirmed.end();) {
for(cit = core.leave_confirmed.begin(); cit != core.leave_confirmed.end();) { auto rm = cit++;
rm = cit++;
if(!(*rm)->is_status(STATUS_LEAVE_CONFIRMED)) if(!(*rm)->is_status(STATUS_LEAVE_CONFIRMED))
core.leave_confirmed.erase(rm); core.leave_confirmed.erase(rm);
} }
......
--ノーブル·ド·ノワール
function c19153634.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c19153634.condition)
e1:SetOperation(c19153634.operation)
c:RegisterEffect(e1)
end
function c19153634.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c19153634.operation(e,tp,eg,ep,ev,re,r,rp)
local ats=eg:GetFirst():GetAttackableTarget()
local at=Duel.GetAttackTarget()
if ats:GetCount()==0 or (at and ats:GetCount()==1) then return end
if Duel.SelectYesNo(tp,aux.Stringid(19153634,0)) then
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(19153634,1))
local g=ats:Select(tp,1,1,at)
Duel.Hint(HINT_CARD,0,19153634)
Duel.HintSelection(g)
Duel.ChangeAttackTarget(g:GetFirst())
end
end
--コトダマ
function c19406822.initial_effect(c)
--adjust
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(c19406822.adjustop)
c:RegisterEffect(e1)
local g=Group.CreateGroup()
g:KeepAlive()
e1:SetLabelObject(g)
end
function c19406822.filter(c,g,pg)
if pg:IsContains(c) then return false end
local code=c:GetCode()
return g:IsExists(Card.IsCode,1,c,code) or pg:IsExists(Card.IsCode,1,c,code)
end
function c19406822.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local c=e:GetHandler()
local pg=e:GetLabelObject()
if c:GetFlagEffect(19406822)==0 then
c:RegisterFlagEffect(19406822,RESET_EVENT+0x1ff0000,0,1)
pg:Clear()
end
local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local dg=g:Filter(c19406822.filter,nil,g,e:GetLabelObject())
if dg:GetCount()==0 or Duel.Destroy(dg,REASON_EFFECT)==0 then
pg:Clear()
pg:Merge(g)
else
g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil)
pg:Clear()
pg:Merge(g)
Duel.Readjust()
end
end
--ラストバトル!
function c28566710.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_STANDBY_PHASE)
e1:SetCondition(c28566710.condition)
e1:SetTarget(c28566710.target)
e1:SetOperation(c28566710.operation)
c:RegisterEffect(e1)
end
function c28566710.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(tp)<=1000 and Duel.GetTurnPlayer()~=tp
end
function c28566710.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,1-tp,LOCATION_DECK)
end
function c28566710.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c28566710.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local hg=Duel.GetFieldGroup(tp,0xe,0xe)
hg:RemoveCard(tc)
Duel.SendtoGrave(hg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(1-tp,c28566710.spfilter,1-tp,LOCATION_DECK,0,1,1,nil,e,tp)
local sc=g:GetFirst()
if sc then
Duel.SpecialSummon(sc,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK)
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
e1:SetTargetRange(1,1)
e1:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e1,tp)
Duel.CalculateDamage(sc,tc)
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c28566710.checkop)
Duel.RegisterEffect(e1,tp)
end
function c28566710.checkop(e,tp,eg,ep,ev,re,r,rp)
local t1=Duel.GetFieldGroupCount(0,LOCATION_MZONE,0)
local t2=Duel.GetFieldGroupCount(1,LOCATION_MZONE,0)
if t1>0 and t2==0 then
Duel.Win(0,0x16)
elseif t2>0 and t1==0 then
Duel.Win(1,0x16)
else
Duel.Win(PLAYER_NONE,0x16)
end
end
--グレイ·ウイング
function c29618570.initial_effect(c)
--multiatk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(29618570,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c29618570.atkcon)
e1:SetCost(c29618570.atkcost)
e1:SetTarget(c29618570.atktg)
e1:SetOperation(c29618570.atkop)
c:RegisterEffect(e1)
end
function c29618570.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1
end
function c29618570.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c29618570.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetEffectCount(EFFECT_EXTRA_ATTACK)==0 end
end
function c29618570.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
--ダブルトラップ
function c3682106.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c3682106.target)
e1:SetOperation(c3682106.activate)
c:RegisterEffect(e1)
end
c3682106.collection={
[40867519]=true;[67750322]=true;[73551138]=true;[01953925]=true;[65403020]=true;
[77585513]=true;[35803249]=true;[94568601]=true;[74841885]=true;[66235877]=true;
[19312169]=true;[51452091]=true;[92408984]=true;[62892347]=true;[42868711]=true;
[90464188]=true;[03370104]=true;[88989706]=true;[20529766]=true;[74841885]=true;
[53347303]=true;[06150044]=true;[49868263]=true;[51447164]=true;[44155002]=true;
[74593218]=true;
}
function c3682106.filter(c)
return c:IsFaceup() and c3682106.collection[c:GetCode()] and c:IsDestructable()
end
function c3682106.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and c3682106.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c3682106.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c3682106.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c3682106.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--冥界流傀儡術
function c40703393.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c40703393.target)
e1:SetOperation(c40703393.activate)
c:RegisterEffect(e1)
end
function c40703393.spfilter(c,e,tp,ft,rg)
local lv=c:GetLevel()
return lv>0 and c:IsRace(RACE_FIEND) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and rg:CheckWithSumEqual(Card.GetLevel,lv,ft,99)
end
function c40703393.rmfilter(c)
return c:GetLevel()>0 and c:IsAbleToRemove()
end
function c40703393.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return false end
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then ft=-ft+1 end
if chk==0 then
local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil)
return Duel.IsExistingTarget(c40703393.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,ft,rg)
end
local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c40703393.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp,ft,rg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c40703393.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then ft=-ft+1 end
if not tc:IsRelateToEffect(e) or not tc:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
local rg=Duel.GetMatchingGroup(c40703393.rmfilter,tp,LOCATION_MZONE,0,nil)
local lv=tc:GetLevel()
if rg:CheckWithSumEqual(Card.GetLevel,lv,ft,99) then
local rm=rg:SelectWithSumEqual(tp,Card.GetLevel,lv,ft,99)
Duel.Remove(rm,POS_FACEUP,REASON_EFFECT)
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--冥王の咆哮
function c41925941.initial_effect(c)
--atkdown
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_CAL)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCondition(c41925941.condition)
e1:SetCost(c41925941.cost)
e1:SetOperation(c41925941.operation)
c:RegisterEffect(e1)
end
function c41925941.condition(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase~=PHASE_DAMAGE and phase~=PHASE_DAMAGE_CAL) or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(tp) then
e:SetLabelObject(d)
return d and a:IsRace(RACE_FIEND) and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle()
else
e:SetLabelObject(a)
return a and a:IsFaceup() and a:IsRace(RACE_FIEND) and a:IsRelateToBattle()
end
end
function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return Duel.GetLP(tp)>100 and bc:IsAttackAbove(100) and bc:IsDefenceAbove(100) end
local maxc=Duel.GetLP(tp)
local atk=bc:GetAttack()
local def=bc:GetDefence()
if atk<maxc then maxc=atk end
if def<maxc then maxc=def end
if maxc>5000 then maxc=5000 end
local t={}
for i=1,maxc/100 do
t[i]=i*100
end
local cost=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,cost)
e:SetLabel(cost)
end
function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
local val=e:GetLabel()
if not bc:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-val)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
bc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
bc:RegisterEffect(e2)
end
--火竜の火炎弾
function c55991637.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(55991637,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c55991637.condition)
e1:SetTarget(c55991637.damtg)
e1:SetOperation(c55991637.damop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(55991637,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c55991637.condition)
e2:SetTarget(c55991637.destg)
e2:SetOperation(c55991637.desop)
c:RegisterEffect(e2)
end
function c55991637.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON)
end
function c55991637.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c55991637.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c55991637.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,800)
end
function c55991637.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c55991637.dfilter(c)
return c:IsFaceup() and c:IsDefenceBelow(800) and c:IsDestructable()
end
function c55991637.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c55991637.dfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c55991637.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c55991637.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c55991637.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and c55991637.dfilter(tc) and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--モノ·シンクロン
function c56897896.initial_effect(c)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetTarget(c56897896.syntg)
e1:SetValue(1)
e1:SetOperation(c56897896.synop)
c:RegisterEffect(e1)
end
c56897896.tuner_filter=aux.FALSE
function c56897896.synfilter(c,syncard,f)
return c:IsFaceup() and c:IsNotTuner() and c:IsCanBeSynchroMaterial(syncard)
and c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR+RACE_MACHINE) and (f==nil or f(c))
end
function c56897896.syntg(e,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end
local g=Duel.GetMatchingGroup(c56897896.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,f)
return lv>=minc and lv<=maxc and g:GetCount()>=lv
end
function c56897896.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel()
local g=Duel.GetMatchingGroup(c56897896.synfilter,syncard:GetControler(),LOCATION_MZONE,LOCATION_MZONE,c,syncard,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=g:Select(tp,lv,lv,nil)
Duel.SetSynchroMaterial(sg)
end
--墓荒らし
function c61705417.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c61705417.target)
e1:SetOperation(c61705417.activate)
c:RegisterEffect(e1)
end
function c61705417.filter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToHand()
end
function c61705417.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and c61705417.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c61705417.filter,tp,0,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c61705417.filter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c61705417.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
tc:RegisterFlagEffect(61705417,RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetOperation(c61705417.tograve)
e1:SetLabelObject(tc)
e1:SetReset(RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_SEND_REPLACE)
e2:SetTarget(c61705417.reptg)
e2:SetReset(RESET_EVENT+0x5c0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAINING)
e3:SetCondition(c61705417.actcon)
e3:SetOperation(c61705417.actop)
e3:SetLabelObject(tc)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function c61705417.tograve(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetControler()~=tc:GetOwner() and tc:GetFlagEffect(61705417)~=0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
function c61705417.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReason(REASON_COST) and c:GetControler()~=c:GetOwner()
and not c:IsStatus(STATUS_CHAINING+STATUS_ACTIVATED) end
Duel.Damage(c:GetControler(),2000,REASON_EFFECT)
return false
end
function c61705417.actcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:GetHandler()==e:GetLabelObject() and re:GetHandler():GetFlagEffect(61705417)~=0
end
function c61705417.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(tp,2000,REASON_EFFECT)
e:Reset()
end
--ドラゴン·ライダー
function c63018132.initial_effect(c)
--flip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(63018132,0))
e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_FLIP)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c63018132.target)
e1:SetOperation(c63018132.operation)
c:RegisterEffect(e1)
end
function c63018132.filter(c)
return c:IsFaceup() and c:IsRace(RACE_DRAGON) and c:IsControlerCanBeChanged()
end
function c63018132.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c63018132.filter(chkc) end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
local g=Duel.SelectTarget(tp,c63018132.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end
function c63018132.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not Duel.GetControl(tc,tp,PHASE_END,1) then
if not tc:IsImmuneToEffect(e) and tc:IsAbleToChangeControler() then
Duel.Destroy(tc,REASON_EFFECT)
end
end
end
--陽動作戦
function c68170903.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_BATTLE_START)
e1:SetOperation(c68170903.activate)
c:RegisterEffect(e1)
end
function c68170903.activate(e,tp,eg,ep,ev,re,r,rp)
--
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetTarget(c68170903.target)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function c68170903.target(e,c)
return c:IsFacedown()
end
--光の護封陣
function c69296555.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c69296555.target)
c:RegisterEffect(e1)
--race
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c69296555.atktg)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end
function c69296555.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,563)
local rc=Duel.AnnounceRace(tp,1,0xffffff)
e:GetLabelObject():SetLabel(rc)
e:GetHandler():SetHint(CHINT_RACE,rc)
end
function c69296555.atktg(e,c)
return c:IsStatus(STATUS_SUMMON_TURN) and c:IsRace(e:GetLabel())
end
--生命吸収装置
function c74318794.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_STANDBY_PHASE,0)
c:RegisterEffect(e1)
--recover
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(74318794,0))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCondition(c74318794.reccon)
e2:SetTarget(c74318794.rectg)
e2:SetOperation(c74318794.recop)
c:RegisterEffect(e2)
if not c74318794.global_check then
c74318794.global_check=true
c74318794[0]=0
c74318794[1]=0
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_PAY_LPCOST)
ge1:SetOperation(c74318794.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge2:SetOperation(c74318794.clear)
Duel.RegisterEffect(ge2,0)
end
end
function c74318794.checkop(e,tp,eg,ep,ev,re,r,rp)
if ep==Duel.GetTurnPlayer() then
c74318794[ep]=c74318794[ep]+ev
end
end
function c74318794.clear(e,tp,eg,ep,ev,re,r,rp)
c74318794[2]=c74318794[Duel.GetTurnPlayer()]
c74318794[Duel.GetTurnPlayer()]=0
end
function c74318794.reccon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c74318794.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(c74318794[2]/2)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,c74318794[2]/2)
end
function c74318794.recop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--投石部隊
function c76075810.initial_effect(c)
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(76075810,0))
e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c76075810.descost)
e1:SetTarget(c76075810.destg)
e1:SetOperation(c76075810.desop)
c:RegisterEffect(e1)
end
function c76075810.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_WARRIOR) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_WARRIOR)
Duel.Release(g,REASON_EFFECT)
end
function c76075810.filter(c,atk)
return c:IsFaceup() and c:GetDefence()<atk and c:IsDestructable()
end
function c76075810.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local atk=e:GetHandler():GetAttack()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c76075810.filter(chkc,atk) end
if chk==0 then return Duel.IsExistingTarget(c76075810.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,atk) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c76075810.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,atk)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:SetLabel(atk)
end
function c76075810.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=e:GetLabel()
if c:IsRelateToEffect(e) and c:IsFaceup() then
atk=c:GetAttack()
end
local tc=Duel.GetFirstTarget()
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) and c76075810.filter(tc,atk) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
--魂粉砕
function c76297408.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c76297408.target1)
e1:SetOperation(c76297408.operation)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(76297408,0))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCondition(c76297408.condition2)
e2:SetCost(c76297408.cost2)
e2:SetTarget(c76297408.target2)
e2:SetOperation(c76297408.operation)
c:RegisterEffect(e2)
end
function c76297408.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_FIEND)
end
function c76297408.rfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c76297408.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return true end
if Duel.IsExistingMatchingCard(c76297408.cfilter,tp,LOCATION_MZONE,0,1,nil) and Duel.CheckLPCost(tp,500)
and Duel.IsExistingTarget(c76297408.rfilter,tp,0,LOCATION_GRAVE,1,nil)
and Duel.IsExistingTarget(c76297408.rfilter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(76297408,1)) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c76297408.rfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(1-tp,c76297408.rfilter,1-tp,0,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0)
else e:SetProperty(0) end
end
function c76297408.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c76297408.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c76297408.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,500) end
Duel.PayLPCost(tp,500)
end
function c76297408.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c76297408.rfilter,tp,0,LOCATION_GRAVE,1,nil)
and Duel.IsExistingTarget(c76297408.rfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g1=Duel.SelectTarget(tp,c76297408.rfilter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local g2=Duel.SelectTarget(1-tp,c76297408.rfilter,1-tp,0,LOCATION_GRAVE,1,1,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g1,g1:GetCount(),0,0)
end
function c76297408.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not g then return end
g=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
--キラー·トマト --キラー·トマト(JP)
function c83011277.initial_effect(c) function c83011277.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--キラー·トマト --キラー·トマト(EU)
function c83011278.initial_effect(c) function c83011278.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--スチーム·シンクロン
function c83295594.initial_effect(c)
--synchro effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83295594,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0+TIMING_MAIN_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c83295594.sccon)
e1:SetTarget(c83295594.sctarg)
e1:SetOperation(c83295594.scop)
c:RegisterEffect(e1)
end
function c83295594.sccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.GetTurnPlayer()~=tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c83295594.sctarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c83295594.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetControler()~=tp or not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,c)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),c)
end
end
...@@ -24,7 +24,8 @@ end ...@@ -24,7 +24,8 @@ end
function c89181369.rmfilter(c) function c89181369.rmfilter(c)
return c:GetLevel()>0 and c:IsAbleToRemove() return c:GetLevel()>0 and c:IsAbleToRemove()
end end
function c89181369.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89181369.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return false end
local rg=Duel.GetMatchingGroup(c89181369.rmfilter,tp,LOCATION_GRAVE,0,nil) local rg=Duel.GetMatchingGroup(c89181369.rmfilter,tp,LOCATION_GRAVE,0,nil)
......
--タイラント·ドラゴン
--not fully implemented
function c94568601.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c94568601.distg)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c94568601.disop)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetTarget(c94568601.distg)
c:RegisterEffect(e3)
--multiatk
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetValue(1)
e4:SetCondition(c94568601.atkcon)
c:RegisterEffect(e4)
--spsummon cost
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SPSUMMON_COST)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_GRAVE)
e5:SetCost(c94568601.spcost)
e5:SetOperation(c94568601.spcop)
c:RegisterEffect(e5)
end
function c94568601.distg(e,c)
if not c:IsType(TYPE_TRAP) or c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsContains(e:GetHandler())
end
function c94568601.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end
if g:IsContains(e:GetHandler()) then
Duel.NegateEffect(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
end
function c94568601.atkcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)>0
end
function c94568601.spcost(e,c,tp)
return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_DRAGON)
end
function c94568601.spcop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_DRAGON)
Duel.Release(g,REASON_EFFECT)
end
...@@ -369,6 +369,7 @@ ...@@ -369,6 +369,7 @@
!victory 0x13 「光之创造神 哈拉克提」效果胜利 !victory 0x13 「光之创造神 哈拉克提」效果胜利
!victory 0x14 「究极封印神 艾克佐迪奥斯」效果胜利 !victory 0x14 「究极封印神 艾克佐迪奥斯」效果胜利
!victory 0x15 「通灵盘」效果胜利 !victory 0x15 「通灵盘」效果胜利
!victory 0x16 「最终一战!」效果胜利
#counters #counters
!counter 0x3001 魔力指示物 !counter 0x3001 魔力指示物
!counter 0x2 楔指示物 !counter 0x2 楔指示物
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
use_d3d = 0 use_d3d = 0
antialias = 2 antialias = 2
errorlog = 1 errorlog = 1
nickname = Sert nickname = Player
gamename = Game gamename = Game
lastdeck = sample lastdeck = sample
textfont = c:/windows/fonts/simsun.ttc 14 textfont = c:/windows/fonts/simsun.ttc 14
numfont = c:/windows/fonts/arialbd.ttf numfont = c:/windows/fonts/arialbd.ttf
serverport = 7911 serverport = 7911
lastip = 220.243.98.220 lastip = 127.0.0.1
lastport = 7911 lastport = 7911
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