1
This commit is contained in:
parent
1341bc0c31
commit
4f3795648e
@ -87,6 +87,9 @@ void Incubator::UnInit()
|
|||||||
|
|
||||||
void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androids)
|
void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androids)
|
||||||
{
|
{
|
||||||
|
if (room->IsNewBieBattle() && target->IsAndroid()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!room->xtimer.IsRunning()) {
|
if (!room->xtimer.IsRunning()) {
|
||||||
A8_ABORT();
|
A8_ABORT();
|
||||||
}
|
}
|
||||||
@ -100,11 +103,13 @@ void Incubator::AllocAndroid(Human* target, int num, std::vector<Human*>* androi
|
|||||||
if (hold_humans_.size() < 1) {
|
if (hold_humans_.size() < 1) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hold_humans_.size() <= CHIJI_HIDE_HUMANS) {
|
if (!room->IsNewBieBattle()) {
|
||||||
if (room->GetGasData().new_area_meta->GetSmallRingCount() < 4) {
|
if (hold_humans_.size() <= CHIJI_HIDE_HUMANS) {
|
||||||
ShowHand();
|
if (room->GetGasData().new_area_meta->GetSmallRingCount() < 4) {
|
||||||
|
ShowHand();
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
#ifdef MYDEBUG
|
#ifdef MYDEBUG
|
||||||
a8::XPrintf("SmallRingCount:%d \n", {room->GetGasData().new_area_meta->GetSmallRingCount()});
|
a8::XPrintf("SmallRingCount:%d \n", {room->GetGasData().new_area_meta->GetSmallRingCount()});
|
||||||
@ -260,10 +265,14 @@ void Incubator::AutoAllocAndroid()
|
|||||||
case GasMoving:
|
case GasMoving:
|
||||||
{
|
{
|
||||||
if (!hold_humans_.empty() && hold_humans_.size() > 0) {
|
if (!hold_humans_.empty() && hold_humans_.size() > 0) {
|
||||||
|
int rnd_space = 70;
|
||||||
|
if (room->IsNewBieBattle()) {
|
||||||
|
rnd_space = 0;
|
||||||
|
}
|
||||||
Human* hum = hold_humans_[0];
|
Human* hum = hold_humans_[0];
|
||||||
if (room->GetGasData().GetGasMode() == GasWaiting &&
|
if (room->GetGasData().GetGasMode() == GasWaiting &&
|
||||||
hold_humans_.size() > 1 &&
|
hold_humans_.size() > 1 &&
|
||||||
((rand() % 100) > 70)) {
|
((rand() % 100) > rnd_space)) {
|
||||||
Human* killer = nullptr;
|
Human* killer = nullptr;
|
||||||
if (hold_humans_.size() == 2) {
|
if (hold_humans_.size() == 2) {
|
||||||
killer = hold_humans_[1];
|
killer = hold_humans_[1];
|
||||||
@ -285,7 +294,9 @@ void Incubator::AutoAllocAndroid()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hold_humans_.erase(hold_humans_.begin());
|
hold_humans_.erase(hold_humans_.begin());
|
||||||
room->xtimer.ModifyTime(alloc_timer_, SERVER_FRAME_RATE * (30 + rand() % 5));
|
if (!room->IsNewBieBattle()) {
|
||||||
|
room->xtimer.ModifyTime(alloc_timer_, SERVER_FRAME_RATE * (30 + rand() % 5));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user