-
Notifications
You must be signed in to change notification settings - Fork 44
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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'.
this.attactStartTime = attackStartTime; | |
this.attackStartTime = attackStartTime; |
Copilot is powered by AI, so mistakes are possible. Review output carefully before use.
|
||
// TODO: Of course not like that, the shot is created and it does what it does | ||
// Set the damage | ||
setDamage(attackTarget, creatureSpell.getShotData1()); |
There was a problem hiding this comment.
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.
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.
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.