-
Notifications
You must be signed in to change notification settings - Fork 22
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
feat: use item activation (right click) for magic staff #226
Conversation
Depends on MovingBlocks/Terasology#4818 Depends on LightAndShadowResources#70
Adjusted for in Terasology/LightAndShadow#226
src/main/java/org/terasology/ligthandshadow/componentsystem/controllers/AttackSystem.java
Outdated
Show resolved
Hide resolved
src/main/java/org/terasology/ligthandshadow/componentsystem/controllers/AttackSystem.java
Outdated
Show resolved
Hide resolved
src/main/java/org/terasology/ligthandshadow/componentsystem/controllers/AttackSystem.java
Outdated
Show resolved
Hide resolved
} | ||
} | ||
|
||
private boolean canPlayerAttack(EntityRef attackingPlayer) { |
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.
we don't need this anymore as the "raycast" check now happens in the engine when creating the ActivateEvent
.
&& event.getTarget().hasComponent(PlayerCharacterComponent.class) | ||
&& event.getTarget().hasComponent(HasFlagComponent.class)) { |
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.
This is also checked in dropFlagOnPlayerAttack
, so we can probably drop this part of the check here... 🤔
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 changes work pretty well and it doesn't cause the problems I initially thought it would cause.
It might be a good idea to shift the staff to the shop (once it's added) instead as now players can remove the flag even without the staff and having a larger range (the staff) shouldn't be the default behavior (as all the players could camp and prevent others from bringing the flag back) and making sure that the player tracks the opponent would probably be necessary (not sure whether occasionally checking whether the target is being detected during the time period would be the right thing to do) as the weapon might be too powerful based on the range. |
Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
This PR makes use of the PRs referenced below to turn the magic staff weapon into an item that is used with "item activation", i.e., right click. As the staff is supposed to be used on range against another player this use case needs to be supported by the engine.
It improves the game play in the sense that using the staff is now similar to using the bow or the fire ball staff instead of a "ranged use" action (as in, opening a door with
e
).Depends on MovingBlocks/Terasology#4818
Depends on Terasology/LightAndShadowResources#70