Skip to content
This repository was archived by the owner on Aug 31, 2019. It is now read-only.

Commit 219e085

Browse files
committed
Add Rank, Score, and Glide filters.
1 parent 767c3a2 commit 219e085

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

src/modules/filters.haml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,26 @@
172172
%code= html_escape('<can-fly/>')
173173
%td
174174
Match if the player can fly.
175+
%tr
176+
%td
177+
%pre
178+
%code= html_escape('<gliding/>')
179+
%td
180+
Match if the player is gliding with an elytra.
181+
%tr
182+
%td
183+
%pre
184+
%code= html_escape('<rank> </rank>')
185+
%td
186+
%a.left-ref-link{:href=>"#rank_score"} <i class="fa fa-chevron-down"></i>
187+
Match if the player or team's rank is within the specified range.
188+
%tr
189+
%td
190+
%pre
191+
%code= html_escape('<score> </score>')
192+
%td
193+
%a.left-ref-link{:href=>"#rank_score"} <i class="fa fa-chevron-down"></i>
194+
Match if the player or team's score is within the specified range.
175195
%tr
176196
%td
177197
%pre
@@ -391,7 +411,7 @@
391411
#### [Random Filter](id:randomFilter)
392412

393413
This filter will randomly `ALLOW` or `DENY` when evaluated in the context of an event.
394-
Its value is a decimal number between 0 and 1, representing the probability of `ALLOW`.
414+
Its value is a decimal fraction between 0 and 1, representing the probability of `ALLOW`.
395415

396416
The value can also be an interval, in the form `[0, 1)`.
397417
When the filter is evaluated, a random number is chosen, and the filter passes if the number falls within the filter's interval.
@@ -418,6 +438,23 @@
418438
<!-- Any number from 0.25 to 0.75 including 0.25 but excluding 0.75 -->
419439
<random>[0.25, 0.75)</random>
420440

441+
442+
:markdown
443+
<br/>
444+
#### [Rank & Score Filters](id:rank_score)
445+
446+
The rank and score filters match if the team's or player's rank or score is a equal to a single value or within a range of values.<br/>
447+
The value can be an exact amount or a interval specifying a range. Only whole numbers are valid.
448+
449+
Examples
450+
451+
<!-- Match if the team (or player in ffa) rank is 3 -->
452+
<rank>3</rank>
453+
454+
<!-- Match if team (or player in ffa) has a score from 5 to 10. -->
455+
<score>[5-10]</score>
456+
457+
421458
:markdown
422459
<br/>
423460
#### [Objective Filter](id:objectiveFilter)

src/modules/proto.haml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
%span.label.label-success New
3030
:markdown
3131
Added `<observing>` and `<participant>` filters. Also added an `observers` filter property to portals to restrict observer access.
32+
%li
33+
%span.label.label-success New
34+
:markdown
35+
Added player rank and score filters. Filters return if the player's rank or score is within the specified range.<br/>
36+
Added a gliding filter, returns if the player is gliding with an elytra.
37+
3238

3339
%br
3440
%h4 Changes in 1.4.0

0 commit comments

Comments
 (0)