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

Feature/creature attacks #473

Merged
merged 8 commits into from
Oct 19, 2024
Merged

Feature/creature attacks #473

merged 8 commits into from
Oct 19, 2024

Conversation

tonihele
Copy link
Owner

Levels the playing field a bit as support fighters now keep their preferred distance and actually use their most powerful arsenal. The front line fighters also cast but prefer melee. Everyone uses melee at melee range, I think this is logical. Impossible to conjure stuff when other creatures are on your skin.

The creature spells are now also hooked up to the shots controller but all is kinda stubbed for now. So creature spells just do instant damage and there are visible fireballs etc :(

Only attack spells are used currently.

@tonihele tonihele merged commit d7ce545 into master Oct 19, 2024
2 of 3 checks passed
@tonihele tonihele deleted the feature/creature-attacks branch October 19, 2024 13:55
@Trass3r Trass3r requested a review from Copilot November 22, 2024 19:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 15 changed files in this pull request and generated 2 suggestions.

Files not reviewed (10)
  • src/toniarts/openkeeper/game/controller/GameWorldController.java: Evaluated as low risk
  • src/toniarts/openkeeper/view/text/CreatureTextParser.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/controller/ShotsController.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/controller/IShotsController.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/logic/CreatureViewSystem.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/logic/CreatureExperienceSystem.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/controller/IGameWorldController.java: Evaluated as low risk
  • src/toniarts/openkeeper/view/control/CreatureFlowerControl.java: Evaluated as low risk
  • src/toniarts/openkeeper/utils/WorldUtils.java: Evaluated as low risk
  • src/toniarts/openkeeper/game/controller/creature/CreatureState.java: Evaluated as low risk
Comments skipped due to low confidence (1)

src/toniarts/openkeeper/game/controller/creature/CreatureController.java:567

  • The variable distanceNeeded is being re-assigned multiple times within the method. This could lead to potential issues if the logic changes. Consider using a different variable name for clarity.
float distanceNeeded = entityData.getComponent(entityId, CreatureMeleeAttack.class).range;

super(attack.rechargeTime, attack.range);
this.creatureSpellId = attack.creatureSpellId;
this.creatureId = attack.creatureId;
this.attactStartTime = attackStartTime;
Copy link
Preview

Copilot AI Nov 22, 2024

Choose a reason for hiding this comment

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

The variable name 'attactStartTime' is misspelled. It should be 'attackStartTime'.

Suggested change
this.attactStartTime = attackStartTime;
this.attackStartTime = attackStartTime;

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options

// TODO: Of course not like that, the shot is created and it does what it does
// Set the damage
setDamage(attackTarget, creatureSpell.getShotData1());
Copy link
Preview

Copilot AI Nov 22, 2024

Choose a reason for hiding this comment

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

The damage is being set directly after creating the shot. This might not be the intended behavior as the shot should handle the damage application.

Suggested change
setDamage(attackTarget, creatureSpell.getShotData1());
// The shot should handle the damage application

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
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

Successfully merging this pull request may close these issues.

1 participant