Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with the battle #38

Open
Para0234 opened this issue Mar 2, 2018 · 1 comment
Open

Error with the battle #38

Para0234 opened this issue Mar 2, 2018 · 1 comment

Comments

@Para0234
Copy link

Para0234 commented Mar 2, 2018

Hi,

I'm an administrator of a custom 2Moons server.

I installed OPBE not long ago, and we fonud a problem.

I have a custom defense, called the Ionic Cannon, which is a single defense (same as shields), and which is created solely to destroy bigger ships in one hit (with even a rapidfire against them)

However, it seems that this defense doesn't act at all in some cases.
The damage output is clearly displayed in the round results, but no damage is applied.

I first thought it was my specific modified defense that made it. However, after a little check, the problem also applies with preexisting defenses of 2Moons, such as the Orbital Platform.

To reproduce this bug in the battle simulator:

Put 100 heavy attacking ships such as the Death Star or the Dark Moon, or even Avatar, with no fodder.

Put 100 000 Missile launchers and 1 Orbital Platform (which has enough firepower to get rid of nearly everything)

Launch the simulation.

You will see that the damage outcome is indeed like what it's supposed to be, however, despite having enough power to get rid of any of them, the attackers doesn't lose a single unit.

The problem is a big one, as it makes more powerful defenses useless.

Do you have any idea about how to fix that?

Thanks,

Para

@jstar88
Copy link
Owner

jstar88 commented Mar 10, 2021

hello, i'm sorry to be busy.
The best way to analize this is to check the report output with $debug = true as below

<?php

require ("../../RunnableTest.php");
class lightvsdeath extends RunnableTest
{
    public function getAttachers()
    {
        $ships = array();
        $ships[] = $this->getShipType(204, 1111);
        $fleet = new Fleet(1, $ships);
        $player = new Player(1, array($fleet),10,10,10);
        return new PlayerGroup(array($player));
    }
    public function getDefenders()
    {
        $ships = array();
        $ships[] = $this->getShipType(209, 11);
        $ships[] = $this->getShipType(214, 1);
        $fleet = new Fleet(2, $ships);
        $player = new Player(2, array($fleet),11,11,11);
        return new PlayerGroup(array($player));
    }
}
new lightvsdeath(true);

could you post the result? thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants