Revamp Challenges
A5H73Y opened this issue ยท 2 comments
Add the ability to challenge multiple players at once.
Current thoughts are:
- /pa challenge (course) [wager] (players...)
- validate each player, if success send invite
- playerB receives invite "PlayerA has challenged you to (course)" & "/pa accept" or "/pa decline"
- playerA gets notification of players choice
- playerA can enter "/pa challenge start" when sufficient players have joined
- iterate through each accepted player on challenge and prepare for course and countdown
- playerB must accept or decline invite, or it can timeout after 15 seconds
- whichever player finishes the course first has the combined total of (wager * no. players)
Few considerations
- playerC can not invite playerB while a challenge request exists for them
- what happens if playerB accepts challenge but leaves course before starting
- wager optional argument is based on whether economy is integrated... this may be super confusing.
- the commands are also kinda confusing, the context changes from invite mode to start mode.
Challenges can now include 2 or more players through a series of invites.
A Challenge can be created either using a command "/pa challenge create (course) [wager]", or using a Challenge Sign. Which will follow the pattern of:
[Parkour]
Challenge
(course)
[wager]
Players can join a Challenge either through invites from the host of the Challenge "/pa challenge invite (players...)", or using the Challenge sign to join an existing Challenge for the Course. If invited the player can accept or decline using "/pa accept" / "/pa decline".
When the host is happy there are enough participants, the challenge host can enter "/pa challenge start".
Based on config the participants can be "prepared" for the Course upon the Challenge start, or at the point they accept a challenge invitation; this will mean the player is teleported to the start of the Course unable to move.
When the countdown has initiated and the counter reaches zero, the player's will have their movement restored and the timer commences.
The first player to reach the end of the Course wins and the player players are notified; if there is a wager the amount will be deducted from each participant and deposited to the winners account.
If any players leave the course, they are considered forfeited and are now unable to win the Challenge. If there are no winners, no players will be awarded or charged and the challenge will terminate.
After thinking a bit more, I believe the entire challenge system should be redesigned.
PlayerA will create a challenge: "/pa challenge create (course) [wager]"
PlayerA can invite players "/pa challenge invite (players...)"
The thinking is that Wager must be set at time at creation, and cannot be changed after the player's accept the invitation.
Player[?] can accept and will added to participants of PlayerA's challenge.
PlayerA can start the challenge "/pa challenge start"