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

feat: use item activation (right click) for magic staff #226

Merged
merged 4 commits into from
Jul 26, 2021

Conversation

skaldarnar
Copy link
Contributor

@skaldarnar skaldarnar commented Jul 8, 2021

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).

  • the staff's effect currently is instant. if we want to nerf it in the future, e.g., by requiring a player to track the enemy flag bearer for some time t, how can we do this with the technical foundation we have here? does the activation event help here, or do we need something different?

Depends on MovingBlocks/Terasology#4818
Depends on Terasology/LightAndShadowResources#70

@skaldarnar skaldarnar requested a review from ahv15 July 8, 2021 21:58
skaldarnar added a commit to Terasology/LightAndShadowResources that referenced this pull request Jul 8, 2021
}
}

private boolean canPlayerAttack(EntityRef attackingPlayer) {
Copy link
Contributor Author

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.

Comment on lines +57 to +58
&& event.getTarget().hasComponent(PlayerCharacterComponent.class)
&& event.getTarget().hasComponent(HasFlagComponent.class)) {
Copy link
Contributor Author

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... 🤔

ahv15
ahv15 previously approved these changes Jul 9, 2021
Copy link
Member

@ahv15 ahv15 left a 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.

@ahv15
Copy link
Member

ahv15 commented Jul 9, 2021

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.

jdrueckert and others added 2 commits July 26, 2021 22:58
Co-authored-by: Tobias Nett <skaldarnar@googlemail.com>
@jdrueckert jdrueckert merged commit 98aa873 into develop Jul 26, 2021
@jdrueckert jdrueckert deleted the feat/ranged-item-activation branch July 26, 2021 21:39
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.

3 participants