Commit 5dc98e82 authored by argon.sun's avatar argon.sun

fix

parent 875b0a5a
...@@ -875,6 +875,7 @@ int32 field::control_adjust(uint16 step) { ...@@ -875,6 +875,7 @@ int32 field::control_adjust(uint16 step) {
core.control_adjust_set[0].clear(); core.control_adjust_set[0].clear();
core.units.begin()->step = 4; core.units.begin()->step = 4;
} else { } else {
core.temp_var[0] = 0;
uint32 count = core.control_adjust_set[0].size() - core.control_adjust_set[1].size() - b1; uint32 count = core.control_adjust_set[0].size() - core.control_adjust_set[1].size() - b1;
core.select_cards.clear(); core.select_cards.clear();
for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit) for(auto cit = core.control_adjust_set[0].begin(); cit != core.control_adjust_set[0].end(); ++cit)
...@@ -893,6 +894,7 @@ int32 field::control_adjust(uint16 step) { ...@@ -893,6 +894,7 @@ int32 field::control_adjust(uint16 step) {
core.control_adjust_set[1].clear(); core.control_adjust_set[1].clear();
core.units.begin()->step = 4; core.units.begin()->step = 4;
} else { } else {
core.temp_var[0] = 1;
uint32 count = core.control_adjust_set[1].size() - core.control_adjust_set[0].size() - b0; uint32 count = core.control_adjust_set[1].size() - core.control_adjust_set[0].size() - b0;
core.select_cards.clear(); core.select_cards.clear();
for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit) for(auto cit = core.control_adjust_set[1].begin(); cit != core.control_adjust_set[1].end(); ++cit)
...@@ -901,7 +903,7 @@ int32 field::control_adjust(uint16 step) { ...@@ -901,7 +903,7 @@ int32 field::control_adjust(uint16 step) {
pduel->write_buffer8(HINT_SELECTMSG); pduel->write_buffer8(HINT_SELECTMSG);
pduel->write_buffer8(infos.turn_player); pduel->write_buffer8(infos.turn_player);
pduel->write_buffer32(504); pduel->write_buffer32(504);
add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 1, count + (count << 16)); add_process(PROCESSOR_SELECT_CARD, 0, 0, 0, 0, count + (count << 16));
} }
} }
} else } else
......
...@@ -4423,12 +4423,12 @@ int32 field::adjust_step(uint16 step) { ...@@ -4423,12 +4423,12 @@ int32 field::adjust_step(uint16 step) {
case 4: { case 4: {
//1-4 control //1-4 control
card* pcard; card* pcard;
uint8 cur, ref, tp = infos.turn_player; uint8 cur, ref;
core.control_adjust_set[0].clear(); core.control_adjust_set[0].clear();
core.control_adjust_set[1].clear(); core.control_adjust_set[1].clear();
for(uint8 p = 0; p < 2; ++p) { for(uint8 p = 0; p < 2; ++p) {
for(uint8 i = 0; i < 5; ++i) { for(uint8 i = 0; i < 5; ++i) {
pcard = player[tp].list_mzone[i]; pcard = player[p].list_mzone[i];
if(!pcard) continue; if(!pcard) continue;
cur = pcard->current.controler; cur = pcard->current.controler;
ref = pcard->refresh_control_status(); ref = pcard->refresh_control_status();
...@@ -4437,7 +4437,6 @@ int32 field::adjust_step(uint16 step) { ...@@ -4437,7 +4437,6 @@ int32 field::adjust_step(uint16 step) {
pcard->operation_param = ref; pcard->operation_param = ref;
} }
} }
tp = 1 - tp;
} }
if(core.control_adjust_set[0].size() || core.control_adjust_set[1].size()) { if(core.control_adjust_set[0].size() || core.control_adjust_set[1].size()) {
core.re_adjust = TRUE; core.re_adjust = TRUE;
......
...@@ -63,9 +63,9 @@ function c38369349.cfilter(c) ...@@ -63,9 +63,9 @@ function c38369349.cfilter(c)
end end
function c38369349.spcon(e,c) function c38369349.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(c38369349.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c38369349.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end
......
...@@ -2,22 +2,35 @@ ...@@ -2,22 +2,35 @@
function c43509019.initial_effect(c) function c43509019.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetTarget(c43509019.cbtg)
e1:SetOperation(c43509019.cbop)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--change battle target --change battle target
local e1=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43509019,0)) e2:SetDescription(aux.Stringid(43509019,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BE_BATTLE_TARGET) e2:SetCode(EVENT_BE_BATTLE_TARGET)
e1:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e1:SetCondition(c43509019.cbcon) e2:SetLabel(1)
e1:SetOperation(c43509019.cbop) e2:SetCondition(c43509019.cbcon)
c:RegisterEffect(e1) e2:SetOperation(c43509019.cbop)
c:RegisterEffect(e2)
end
function c43509019.cbtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local bt=Duel.GetAttackTarget()
if Duel.CheckEvent(EVENT_BE_BATTLE_TARGET) and bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON)
and bt:GetControler()==e:GetHandlerPlayer() and Duel.SelectyesNo(tp,aux.Stringid(43509019,1)) then
e:SetLabel(1)
else e:SetLabel(0) end
end end
function c43509019.cbcon(e,tp,eg,ep,ev,re,r,rp) function c43509019.cbcon(e,tp,eg,ep,ev,re,r,rp)
local bt=eg:GetFirst() local bt=eg:GetFirst()
return bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON) and bt:GetControler()==e:GetHandlerPlayer() return bt:IsFaceup() and bt:IsLevelBelow(4) and bt:IsType(TYPE_TOON) and bt:GetControler()==e:GetHandlerPlayer()
end end
function c43509019.cbop(e,tp,eg,ep,ev,re,r,rp) function c43509019.cbop(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
Duel.ChangeAttackTarget(nil) Duel.ChangeAttackTarget(nil)
end
end end
...@@ -19,7 +19,7 @@ function c48216773.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,7 +19,7 @@ function c48216773.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local dg1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,0,1,1nil) local dg1=Duel.SelectMatchingCard(tp,Card.IsAbleToDeck,tp,LOCATION_MZONE,0,1,1nil)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TODECK)
local dg1=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_MZONE,0,1,1nil) local dg2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,1-tp,LOCATION_MZONE,0,1,1nil)
dg1:Merge(dg2) dg1:Merge(dg2)
Duel.SendtoDeck(dg1,nil,2,REASON_EFFECT) Duel.SendtoDeck(dg1,nil,2,REASON_EFFECT)
end end
...@@ -63,9 +63,9 @@ function c53183600.cfilter(c) ...@@ -63,9 +63,9 @@ function c53183600.cfilter(c)
end end
function c53183600.spcon(e,c) function c53183600.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(c53183600.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c53183600.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end
......
...@@ -63,9 +63,9 @@ function c65458948.cfilter(c) ...@@ -63,9 +63,9 @@ function c65458948.cfilter(c)
end end
function c65458948.spcon(e,c) function c65458948.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(c65458948.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c65458948.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end
......
...@@ -47,7 +47,6 @@ function c74854609.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,7 +47,6 @@ function c74854609.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_CONTROL) e2:SetCode(EFFECT_SET_CONTROL)
e2:SetValue(tp) e2:SetValue(tp)
e2:SetReset(RESET_EVENT+0x1fc0000) e2:SetReset(RESET_EVENT+0x1fc0000)
e2:SetLabelObject(ec) ec:RegisterEffect(e2)
c:RegisterEffect(e2)
end end
end end
...@@ -64,9 +64,9 @@ function c90960358.cfilter(c) ...@@ -64,9 +64,9 @@ function c90960358.cfilter(c)
end end
function c90960358.spcon(e,c) function c90960358.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(c90960358.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c90960358.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end
......
...@@ -63,9 +63,9 @@ function c91842653.cfilter(c) ...@@ -63,9 +63,9 @@ function c91842653.cfilter(c)
end end
function c91842653.spcon(e,c) function c91842653.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler()
if not Duel.IsExistingMatchingCard(c91842653.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end if not Duel.IsExistingMatchingCard(c91842653.cfilter,tp,LOCATION_ONFIELD,0,1,nil) then return false end
local lv=c:GetLevel() local lv=c:GetLevel()
local tp=c:GetControler()
if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if lv<5 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil) elseif lv<7 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.CheckReleaseGroup(tp,nil,1,nil)
else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end else return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2 and Duel.CheckReleaseGroup(tp,nil,2,nil) end
......
...@@ -9,5 +9,5 @@ lastdeck = test ...@@ -9,5 +9,5 @@ lastdeck = test
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 = 192.168.2.100 lastip = 192.168.1.100
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