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

lightning storm updates #5436

Merged
merged 19 commits into from
Oct 29, 2024
Merged

Conversation

kuronekochomusuke
Copy link
Collaborator

@kuronekochomusuke kuronekochomusuke commented Apr 29, 2024

  • update lightning storm effects
  • resolve end turn lightning storm damage
  • option to target units

image

@kuronekochomusuke kuronekochomusuke marked this pull request as draft April 29, 2024 23:56
@kuronekochomusuke kuronekochomusuke added the Planetary Conditions Planetary Conditions changes label Apr 29, 2024
@HammerGS
Copy link
Member

This looks awesome and fun

@kuronekochomusuke
Copy link
Collaborator Author

what do you think about a option to randomly hit a spot containing a unit? I implemented it as a random hex on the board, and with a large map it is not likely to hit anything. the rule says using any manner the players agree on for the locations.

@HammerGS
Copy link
Member

I like it. Mechs as lightning rods.

Copy link

codecov bot commented Oct 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 29.07%. Comparing base (f369de6) to head (d16e380).
Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5436      +/-   ##
============================================
- Coverage     29.07%   29.07%   -0.01%     
- Complexity    13971    13973       +2     
============================================
  Files          2601     2601              
  Lines        267426   267493      +67     
  Branches      47744    47761      +17     
============================================
+ Hits          77766    77769       +3     
- Misses       185763   185827      +64     
  Partials       3897     3897              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kuronekochomusuke kuronekochomusuke marked this pull request as ready for review October 26, 2024 20:59
Copy link
Member

@SJuliez SJuliez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please see the comments

}

List<Entity> hitEntities = game.getEntitiesVector().stream()
.filter(e -> e.getPosition().equals(coords)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getPosition can return null, better turn this comparison around

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, should the lightning storm disregard offboard units?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not gun emplacements?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default it only targets a on board hexes.
adding off board hexes would make hitting anything very rare, since you can have units sheets away from the main board.

if you use the option to target units, it will target off board units also if they have a posiition.

for gun emplacements I was thinking the building takes the damage. that is what it looks like it does for other damage types.

image
image

@HammerGS
Copy link
Member

Let me know if the changes are done. Aiming to get some merged in for the nightly.

@kuronekochomusuke
Copy link
Collaborator Author

it is done

@HammerGS HammerGS merged commit 785fc3b into MegaMek:master Oct 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Planetary Conditions Planetary Conditions changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants