Commit 3994da1c authored by VanillaSalt's avatar VanillaSalt

fix

parent 2ef13fc4
...@@ -250,24 +250,18 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) { ...@@ -250,24 +250,18 @@ bool MenuHandler::OnEvent(const irr::SEvent& event) {
tm* st = localtime(&curtime); tm* st = localtime(&curtime);
myswprintf(infobuf, L"%d/%d/%d %02d:%02d:%02d\n", st->tm_year + 1900, st->tm_mon + 1, st->tm_mday, st->tm_hour, st->tm_min, st->tm_sec); myswprintf(infobuf, L"%d/%d/%d %02d:%02d:%02d\n", st->tm_year + 1900, st->tm_mon + 1, st->tm_mday, st->tm_hour, st->tm_min, st->tm_sec);
repinfo.append(infobuf); repinfo.append(infobuf);
wchar_t namebuf[4][20]; wchar_t namebuf[4][20];
BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[0], namebuf[0], 20);
if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG) BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[40], namebuf[1], 20);
{ if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG) {
BufferIO::CopyWStr((unsigned short *) &ReplayMode::cur_replay.replay_data[120],namebuf[3],20); BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[80], namebuf[2], 20);
BufferIO::CopyWStr((unsigned short *) &ReplayMode::cur_replay.replay_data[80],namebuf[2],20); BufferIO::CopyWStr((unsigned short*)&ReplayMode::cur_replay.replay_data[120], namebuf[3], 20);
} }
BufferIO::CopyWStr((unsigned short *) &ReplayMode::cur_replay.replay_data[0],namebuf[0],20);
BufferIO::CopyWStr((unsigned short *) &ReplayMode::cur_replay.replay_data[40],namebuf[1],20);
if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG) if(ReplayMode::cur_replay.pheader.flag & REPLAY_TAG)
myswprintf(infobuf, L"%ls\n%ls\n===VS===\n%ls\n%ls\n", namebuf[0], namebuf[1], myswprintf(infobuf, L"%ls\n%ls\n===VS===\n%ls\n%ls\n", namebuf[0], namebuf[1], namebuf[2], namebuf[3]);
namebuf[2], namebuf[3]);
else else
myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", namebuf[0], namebuf[1]);repinfo.append(infobuf); myswprintf(infobuf, L"%ls\n===VS===\n%ls\n", namebuf[0], namebuf[1]);
repinfo.append(infobuf);
mainGame->ebRepStartTurn->setText(L"1"); mainGame->ebRepStartTurn->setText(L"1");
mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, (wchar_t*)repinfo.c_str()); mainGame->SetStaticText(mainGame->stReplayInfo, 180, mainGame->guiFont, (wchar_t*)repinfo.c_str());
break; break;
......
...@@ -13,8 +13,8 @@ Replay::Replay() { ...@@ -13,8 +13,8 @@ Replay::Replay() {
comp_data = new unsigned char[0x2000]; comp_data = new unsigned char[0x2000];
} }
Replay::~Replay() { Replay::~Replay() {
delete replay_data; delete[] replay_data;
delete comp_data; delete[] comp_data;
} }
void Replay::BeginRecord() { void Replay::BeginRecord() {
#ifdef _WIN32 #ifdef _WIN32
......
...@@ -2635,7 +2635,7 @@ int32 scriptlib::duel_set_dice_result(lua_State * L) { ...@@ -2635,7 +2635,7 @@ int32 scriptlib::duel_set_dice_result(lua_State * L) {
int32 res; int32 res;
for(int32 i = 0; i < 5; ++i) { for(int32 i = 0; i < 5; ++i) {
res = lua_tointeger(L, i + 1); res = lua_tointeger(L, i + 1);
if(res < 1 && res > 6) if(res < 1 || res > 6)
res = 1; res = 1;
pduel->game_field->core.dice_result[i] = res; pduel->game_field->core.dice_result[i] = res;
} }
......
...@@ -52,7 +52,7 @@ function c10755153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -52,7 +52,7 @@ function c10755153.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c10755153.desop(e,tp,eg,ep,ev,re,r,rp) function c10755153.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
end end
end end
...@@ -12,7 +12,9 @@ function c18271561.initial_effect(c) ...@@ -12,7 +12,9 @@ function c18271561.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c18271561.filter(c,tp) function c18271561.filter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) local pos=c:GetPreviousPosition()
if c:IsReason(REASON_BATTLE) then pos=c:GetBattlePosition() end
return c:IsPreviousLocation(LOCATION_MZONE) and bit.band(pos,POS_FACEUP)~=0
and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY) and c:GetPreviousControler()==tp and c:IsReason(REASON_DESTROY)
end end
function c18271561.condition(e,tp,eg,ep,ev,re,r,rp,chk) function c18271561.condition(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -22,6 +22,6 @@ function c18752938.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -22,6 +22,6 @@ function c18752938.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c18752938.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c18752938.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -6,10 +6,14 @@ function c19113101.initial_effect(c) ...@@ -6,10 +6,14 @@ function c19113101.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c19113101.condition)
e1:SetCost(c19113101.cost) e1:SetCost(c19113101.cost)
e1:SetOperation(c19113101.operation) e1:SetOperation(c19113101.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c19113101.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c19113101.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c19113101.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
......
...@@ -10,7 +10,6 @@ function c2061963.initial_effect(c) ...@@ -10,7 +10,6 @@ function c2061963.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c2061963.condition) e1:SetCondition(c2061963.condition)
e1:SetCost(c2061963.cost) e1:SetCost(c2061963.cost)
......
...@@ -28,9 +28,6 @@ function c29616929.checkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,9 +28,6 @@ function c29616929.checkop(e,tp,eg,ep,ev,re,r,rp)
tc=eg:GetNext() tc=eg:GetNext()
end end
end end
function c29616929.filter(c)
return c:IsFaceup() and c:IsSetCard(0x19)
end
function c29616929.condition(e,tp,eg,ep,ev,re,r,rp) function c29616929.condition(e,tp,eg,ep,ev,re,r,rp)
local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION) local loc=Duel.GetChainInfo(0,CHAININFO_TRIGGERING_LOCATION)
return ep~=tp and loc==LOCATION_MZONE and re:GetHandler():GetFlagEffect(29616929)>0 and Duel.IsChainNegatable(ev) return ep~=tp and loc==LOCATION_MZONE and re:GetHandler():GetFlagEffect(29616929)>0 and Duel.IsChainNegatable(ev)
......
...@@ -56,6 +56,7 @@ function c31480215.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,6 +56,7 @@ function c31480215.spop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(c31480215.splimit) e1:SetTarget(c31480215.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then if Duel.IsPlayerCanSpecialSummonMonster(tp,31533705,0x101b,0x4011,0,0,3,RACE_MACHINE,ATTRIBUTE_WIND) then
......
...@@ -45,7 +45,7 @@ function c31919988.atop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +45,7 @@ function c31919988.atop(e,tp,eg,ep,ev,re,r,rp)
or tc:GetAttack()<=c:GetAttack() then return end or tc:GetAttack()<=c:GetAttack() then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(c:GetAttack()) e1:SetValue(c:GetAttack())
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
......
...@@ -44,7 +44,6 @@ function c33725002.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -44,7 +44,6 @@ function c33725002.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end end
function c33725002.spop(e,tp,eg,ep,ev,re,r,rp) function c33725002.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
...@@ -90,6 +89,20 @@ function c33725002.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -90,6 +89,20 @@ function c33725002.destg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,g:GetCount()*1000)
end end
function c33725002.desop(e,tp,eg,ep,ev,re,r,rp) function c33725002.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+0x1fe0000)
ec:RegisterEffect(e2)
end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
local ct=Duel.Destroy(g,REASON_EFFECT) local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then if ct>0 then
......
...@@ -38,7 +38,7 @@ function c46668237.cfilter(c,tp) ...@@ -38,7 +38,7 @@ function c46668237.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:GetPreviousControler()==tp and c:GetFlagEffect(46668237)~=0 return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_BEAST) and c:GetPreviousControler()==tp and c:GetFlagEffect(46668237)~=0
end end
function c46668237.condition(e,tp,eg,ep,ev,re,r,rp) function c46668237.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c46668237.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c46668237.cfilter,1,nil,tp)
end end
function c46668237.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c46668237.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end if chk==0 then return Duel.CheckLPCost(tp,1000) end
......
...@@ -31,7 +31,7 @@ function c50785356.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +31,7 @@ function c50785356.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(3) e1:SetValue(3)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
end end
...@@ -19,6 +19,7 @@ function c63883999.initial_effect(c) ...@@ -19,6 +19,7 @@ function c63883999.initial_effect(c)
e3:SetDescription(aux.Stringid(63883999,0)) e3:SetDescription(aux.Stringid(63883999,0))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1) e3:SetCountLimit(1)
e3:SetCost(c63883999.cost) e3:SetCost(c63883999.cost)
...@@ -32,7 +33,7 @@ function c63883999.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +33,7 @@ function c63883999.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c63883999.filter(c,e,tp) function c63883999.filter(c,e,tp)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and c:IsSetCard(0x45) and c:IsAbleToRemoveAsCost() return lv>0 and c:IsSetCard(0x45)
and Duel.IsExistingMatchingCard(c63883999.rfilter,tp,LOCATION_MZONE,0,1,c) and Duel.IsExistingMatchingCard(c63883999.rfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.IsExistingMatchingCard(c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp) and Duel.IsExistingMatchingCard(c63883999.spfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_DECK,0,1,nil,lv,e,tp)
end end
...@@ -43,7 +44,8 @@ function c63883999.spfilter(c,lv,e,tp) ...@@ -43,7 +44,8 @@ function c63883999.spfilter(c,lv,e,tp)
return c:IsSetCard(0x45) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x45) and c:GetLevel()==lv and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c63883999.target(e,tp,eg,ep,ev,re,r,rp,chk) function c63883999.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c63883999.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingTarget(c63883999.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c63883999.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
--幻獣機ウォーブラン --幻獣機ブルーインパラス
function c67489919.initial_effect(c) function c67489919.initial_effect(c)
-- --
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -72,13 +72,13 @@ function c67489919.syntg(e,syncard,f,minc,maxc) ...@@ -72,13 +72,13 @@ function c67489919.syntg(e,syncard,f,minc,maxc)
local c=e:GetHandler() local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel() local lv=syncard:GetLevel()-c:GetLevel()
if lv<=0 then return false end if lv<=0 then return false end
local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE+LOCATION_HAND,c,syncard,c,f) local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard) return g:CheckWithSumEqual(Card.GetSynchroLevel,lv,minc,maxc,syncard)
end end
function c67489919.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc) function c67489919.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,minc,maxc)
local c=e:GetHandler() local c=e:GetHandler()
local lv=syncard:GetLevel()-c:GetLevel() local lv=syncard:GetLevel()-c:GetLevel()
local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE+LOCATION_HAND,c,syncard,c,f) local g=Duel.GetMatchingGroup(c67489919.synfilter,syncard:GetControler(),LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard) local sg=g:SelectWithSumEqual(tp,Card.GetSynchroLevel,lv,minc,maxc,syncard)
Duel.SetSynchroMaterial(sg) Duel.SetSynchroMaterial(sg)
......
...@@ -15,13 +15,14 @@ function c67949763.filter(c,tp) ...@@ -15,13 +15,14 @@ function c67949763.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,c:GetAttack(),0,1,RACE_FIEND,ATTRIBUTE_DARK) and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,c:GetAttack(),0,1,RACE_FIEND,ATTRIBUTE_DARK)
end end
function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk) function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67949763.filter(chkc,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>2
and Duel.IsExistingTarget(c67949763.filter,tp,LOCATION_MZONE,0,1,nil,tp) end and Duel.IsExistingTarget(c67949763.filter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c67949763.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) Duel.SelectTarget(tp,c67949763.filter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,4,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,3,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,4,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,3,0,0)
end end
function c67949763.activate(e,tp,eg,ep,ev,re,r,rp) function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -17,7 +17,7 @@ function c68371799.initial_effect(c) ...@@ -17,7 +17,7 @@ function c68371799.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetTarget(c68371799.descon) e2:SetCondition(c68371799.descon)
e2:SetTarget(c68371799.destg) e2:SetTarget(c68371799.destg)
e2:SetOperation(c68371799.desop) e2:SetOperation(c68371799.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
...@@ -41,10 +41,16 @@ function c68371799.spcon(e,c) ...@@ -41,10 +41,16 @@ function c68371799.spcon(e,c)
local tp=c:GetControler() local tp=c:GetControler()
return Duel.GetFlagEffect(tp,68371799)==0 return Duel.GetFlagEffect(tp,68371799)==0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c68371799.filter,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(c68371799.filter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c68371799.spop(e,tp,eg,ep,ev,re,r,rp,c) function c68371799.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RegisterFlagEffect(tp,68371799,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1) Duel.RegisterFlagEffect(tp,68371799,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end end
function c68371799.descon(e,tp,eg,ep,ev,re,r,rp) function c68371799.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
function c69723159.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c69723159.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c69723159.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c69723159.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c69723159.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingTarget(c69723159.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c69723159.filter,tp,0,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,c69723159.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
......
...@@ -6,7 +6,6 @@ function c70546737.initial_effect(c) ...@@ -6,7 +6,6 @@ function c70546737.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1)
e1:SetTarget(c70546737.lvtg) e1:SetTarget(c70546737.lvtg)
e1:SetOperation(c70546737.lvop) e1:SetOperation(c70546737.lvop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -40,12 +39,12 @@ function c70546737.lvop(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,12 +39,12 @@ function c70546737.lvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e)
and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then and (not tc:IsLocation(LOCATION_MZONE) or tc:IsFaceup()) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(tc:GetLevel()) e1:SetValue(tc:GetLevel())
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
e:GetHandler():RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c70546737.descon(e,tp,eg,ep,ev,re,r,rp) function c70546737.descon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,7 +31,6 @@ function c71880877.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,6 @@ function c71880877.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c71880877.sumop(e,tp,eg,ep,ev,re,r,rp) function c71880877.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71880877.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c71880877.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
...@@ -41,9 +40,9 @@ function c71880877.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -41,9 +40,9 @@ function c71880877.sumop(e,tp,eg,ep,ev,re,r,rp)
end end
function c71880877.rmfilter(c,tp) function c71880877.rmfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c71880877.filter,tp,LOCATION_GRAVE,0,1,c) and Duel.IsExistingTarget(c71880877.thfilter,tp,LOCATION_GRAVE,0,1,c)
end end
function c71880877.filter(c) function c71880877.thfilter(c)
return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c71880877.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function c71880877.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -53,14 +52,13 @@ function c71880877.thcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,14 +52,13 @@ function c71880877.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c71880877.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c71880877.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71880877.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c71880877.thfilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c71880877.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c71880877.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c71880877.thop(e,tp,eg,ep,ev,re,r,rp) function c71880877.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
......
...@@ -14,6 +14,12 @@ function c75840616.initial_effect(c) ...@@ -14,6 +14,12 @@ function c75840616.initial_effect(c)
e1:SetTarget(c75840616.target) e1:SetTarget(c75840616.target)
e1:SetOperation(c75840616.operation) e1:SetOperation(c75840616.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--attack all
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_ATTACK_ALL)
e2:SetValue(1)
c:RegisterEffect(e2)
end end
function c75840616.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c75840616.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......
--No.66 覇鍵甲虫マスター・キー・ビートル --No.66 覇鍵甲虫マスター・キー・ビートル
function c76067258.initial_effect(c) function c76067258.initial_effect(c)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),4),2) aux.AddXyzProcedure(c,aux.XyzFilterFunctionF(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_DARK),4),2)
c:EnableReviveLimit() c:EnableReviveLimit()
--target --target
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -17,7 +17,7 @@ function c78845026.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -17,7 +17,7 @@ function c78845026.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78845026.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c78845026.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c78845026.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c78845026.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c78845026.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c78845026.filter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c78845026.activate(e,tp,eg,ep,ev,re,r,rp) function c78845026.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
...@@ -25,7 +25,7 @@ function c78845026.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ function c78845026.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE) e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END) e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(TYPE_TUNER) e1:SetValue(TYPE_TUNER)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
end end
......
...@@ -31,7 +31,6 @@ function c8091563.sumtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,7 +31,6 @@ function c8091563.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp) function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c8091563.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c8091563.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
...@@ -39,13 +38,6 @@ function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,13 +38,6 @@ function c8091563.sumop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function c8091563.rmfilter(c,tp)
return c:IsRace(RACE_MACHINE) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
and Duel.IsExistingTarget(c8091563.filter,tp,LOCATION_GRAVE,0,1,c)
end
function c8091563.filter(c)
return (c:IsSetCard(0x85) or c:IsCode(71071546)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c8091563.spcon(e,tp,eg,ep,ev,re,r,rp) function c8091563.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst() local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsPreviousLocation(LOCATION_GRAVE) and (tc:IsSetCard(0x85) or tc:IsCode(71071546)) return eg:GetCount()==1 and tc:IsPreviousLocation(LOCATION_GRAVE) and (tc:IsSetCard(0x85) or tc:IsCode(71071546))
...@@ -57,7 +49,6 @@ function c8091563.sptg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -57,7 +49,6 @@ function c8091563.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,eg,1,0,0)
end end
function c8091563.spop(e,tp,eg,ep,ev,re,r,rp) function c8091563.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -11,6 +11,15 @@ function c82670878.initial_effect(c) ...@@ -11,6 +11,15 @@ function c82670878.initial_effect(c)
e1:SetTarget(c82670878.target) e1:SetTarget(c82670878.target)
e1:SetOperation(c82670878.operation) e1:SetOperation(c82670878.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--atk/def up
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(82670878,1))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(c82670878.adcon)
e2:SetOperation(c82670878.adop)
c:RegisterEffect(e2)
if not c82670878.global_check then if not c82670878.global_check then
c82670878.global_check=true c82670878.global_check=true
c82670878[0]=0 c82670878[0]=0
...@@ -37,10 +46,8 @@ function c82670878.check(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,10 +46,8 @@ function c82670878.check(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetAttackTarget()==nil then if Duel.GetAttackTarget()==nil then
c82670878[1-tc:GetControler()]=c82670878[1-tc:GetControler()]+1 c82670878[1-tc:GetControler()]=c82670878[1-tc:GetControler()]+1
if c82670878[1-tc:GetControler()]==1 then if c82670878[1-tc:GetControler()]==1 then
c82670878[2]=Duel.GetAttacker() c82670878[2]=tc
c82670878[3]=Duel.GetAttacker():GetAttack() tc:RegisterFlagEffect(82670878,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
c82670878[4]=Duel.GetAttacker():GetDefence()
Duel.GetAttacker():RegisterFlagEffect(82670878,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
elseif c82670878[1-tc:GetControler()]==2 then elseif c82670878[1-tc:GetControler()]==2 then
Duel.RaiseEvent(tc,82670878,e,0,0,0,0) Duel.RaiseEvent(tc,82670878,e,0,0,0,0)
end end
...@@ -63,37 +70,44 @@ function c82670878.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -63,37 +70,44 @@ function c82670878.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.ConfirmCards(1-tp,c)
Duel.ShuffleHand(tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end end
function c82670878.operation(e,tp,eg,ep,ev,re,r,rp) function c82670878.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then if c:IsRelateToEffect(e) then
if c82670878[2] and c82670878[2]:GetFlagEffect(82670878) then Duel.SpecialSummon(c,1,tp,tp,false,false,POS_FACEUP)
end
end
function c82670878.adcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
end
function c82670878.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c82670878[2]
if c:IsFaceup() and c:IsRelateToEffect(e) then
if tc and tc:GetFlagEffect(82670878) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+0x1ff0000) e1:SetReset(RESET_EVENT+0x1ff0000)
e1:SetValue(c82670878[3]) e1:SetValue(tc:GetAttack())
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE) e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(c82670878[4]) e2:SetValue(tc:GetDefence())
c:RegisterEffect(e2) c:RegisterEffect(e2)
--at limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetTarget(c82670878.atlimit)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end end
Duel.SpecialSummonComplete() --at limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetTarget(c82670878.atlimit)
e3:SetValue(1)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end end
end end
function c82670878.atlimit(e,c) function c82670878.atlimit(e,c)
......
...@@ -12,12 +12,12 @@ function c89086566.initial_effect(c) ...@@ -12,12 +12,12 @@ function c89086566.initial_effect(c)
end end
function c89086566.cfilter(c) function c89086566.cfilter(c)
local code=c:GetCode() local code=c:GetCode()
return (code==40640057 or code==40703223) and c:IsDestructable() and c:IsFaceup() return c:IsFaceup() and (code==40640057 or code==40703223) and c:IsDestructable()
end end
function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk) function c89086566.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c89086566.cfilter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c89086566.activate(e,tp,eg,ep,ev,re,r,rp) function c89086566.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c89086566.cfilter,tp,LOCATION_MZONE,0,nil)
......
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