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

fix

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