@gamepark/skyrift 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENCE.md +108 -0
- package/dist/SkyriftRules.d.ts +6 -4
- package/dist/SkyriftRules.js +2 -0
- package/dist/rules/EffectRule.js +1 -1
- package/dist/rules/EndPlayerTurnRule.d.ts +6 -0
- package/dist/rules/EndPlayerTurnRule.js +14 -0
- package/dist/rules/PlayCardRule.js +1 -1
- package/dist/rules/RuleId.d.ts +5 -4
- package/dist/rules/RuleId.js +5 -4
- package/package.json +34 -33
package/LICENCE.md
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Game Park Source Available License (Non-Commercial)
|
|
2
|
+
|
|
3
|
+
Version 1.0
|
|
4
|
+
|
|
5
|
+
Copyright (c) Game Park
|
|
6
|
+
All rights reserved.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
1. Definitions
|
|
10
|
+
|
|
11
|
+
"Software" means the source code contained in this repository, excluding any Assets
|
|
12
|
+
as defined below.
|
|
13
|
+
|
|
14
|
+
"Game Park" means the entity operating the Game Park platform and owning this
|
|
15
|
+
repository.
|
|
16
|
+
|
|
17
|
+
"Commercial Use" means any use of the Software that is intended for, or results in,
|
|
18
|
+
direct or indirect commercial advantage or monetary compensation, including but not
|
|
19
|
+
limited to:
|
|
20
|
+
- offering the Software or a derivative work as part of a paid product or service,
|
|
21
|
+
- offering the Software as a hosted or SaaS service,
|
|
22
|
+
- selling licenses, subscriptions, or access to the Software,
|
|
23
|
+
- using the Software to generate advertising, sponsorship, or similar revenue.
|
|
24
|
+
|
|
25
|
+
"Internal Non-Recreational Use" means use of the Software solely for internal purposes
|
|
26
|
+
such as evaluation, development, testing, research, education, or operational support,
|
|
27
|
+
and not for entertainment, gaming, or recreational use by end users.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
2. Grant of Rights
|
|
31
|
+
|
|
32
|
+
Subject to the terms of this License, Game Park hereby grants you a non-exclusive,
|
|
33
|
+
worldwide, royalty-free right to:
|
|
34
|
+
|
|
35
|
+
- view, copy, and modify the Software,
|
|
36
|
+
- fork the repository,
|
|
37
|
+
- use the Software for Internal Non-Recreational Use only,
|
|
38
|
+
- submit contributions to the Software.
|
|
39
|
+
|
|
40
|
+
All rights not expressly granted in this License are reserved by Game Park.
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
3. Restrictions
|
|
44
|
+
|
|
45
|
+
You may NOT, without prior written permission from Game Park:
|
|
46
|
+
|
|
47
|
+
- use the Software for any Commercial Use,
|
|
48
|
+
- offer the Software or a derivative work to end users for recreational or gaming
|
|
49
|
+
purposes,
|
|
50
|
+
- distribute, sublicense, or make the Software available as part of a product or
|
|
51
|
+
service intended for public use,
|
|
52
|
+
- remove or alter any copyright, license, or attribution notices.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
4. Contributions
|
|
56
|
+
|
|
57
|
+
By submitting a contribution to this repository, you agree that:
|
|
58
|
+
|
|
59
|
+
- your contribution is provided under the terms of this License,
|
|
60
|
+
- Game Park may use, modify, relicense, and commercially exploit your contribution
|
|
61
|
+
without restriction,
|
|
62
|
+
- you represent that you have the right to grant these permissions.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
5. Assets and Images (Explicit Exclusion)
|
|
66
|
+
|
|
67
|
+
This License does NOT apply to any images, illustrations, game boards, cards, icons,
|
|
68
|
+
logos, or other visual or audio assets included in this repository ("Assets").
|
|
69
|
+
|
|
70
|
+
All Assets remain the exclusive property of their respective rights holders.
|
|
71
|
+
You may not copy, modify, redistribute, or use these Assets for any purpose without
|
|
72
|
+
explicit permission from the applicable rights holder.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
6. No Trademark License
|
|
76
|
+
|
|
77
|
+
This License does not grant any rights to use the name "Game Park", its logos, or any
|
|
78
|
+
other trademarks or brand identifiers of Game Park.
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
7. Disclaimer of Warranty
|
|
82
|
+
|
|
83
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
84
|
+
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
|
|
85
|
+
PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
8. Limitation of Liability
|
|
89
|
+
|
|
90
|
+
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL GAME PARK BE LIABLE
|
|
91
|
+
FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR
|
|
92
|
+
OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
93
|
+
DEALINGS IN THE SOFTWARE.
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
9. Termination
|
|
97
|
+
|
|
98
|
+
Any violation of this License will automatically terminate your rights under this
|
|
99
|
+
License. Upon termination, you must cease all use of the Software and destroy any
|
|
100
|
+
copies in your possession.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
10. Contact for Commercial Licensing
|
|
104
|
+
|
|
105
|
+
For commercial use, licensing inquiries, or permissions not covered by this License,
|
|
106
|
+
please contact:
|
|
107
|
+
|
|
108
|
+
contact@game-park.com
|
package/dist/SkyriftRules.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ import { MaterialType } from './material/MaterialType';
|
|
|
25
25
|
import { ChallengeRule } from './rules/ChallengeRule';
|
|
26
26
|
import { DiscardEffectRule } from './rules/DiscardEffectRule';
|
|
27
27
|
import { DrawEffectRule } from './rules/DrawEffectRule';
|
|
28
|
+
import { EndPlayerTurnRule } from './rules/EndPlayerTurnRule';
|
|
28
29
|
import { EndRoundRule } from './rules/EndRoundRule';
|
|
29
30
|
import { GainCrystalEffectRule } from './rules/GainCrystalEffectRule';
|
|
30
31
|
import { MayChallengeRule } from './rules/MayChallengeRule';
|
|
@@ -38,10 +39,11 @@ export declare class SkyriftRules extends SecretMaterialRules<Deck, MaterialType
|
|
|
38
39
|
1: typeof StartRoundRule;
|
|
39
40
|
2: typeof StartPlayerTurnRule;
|
|
40
41
|
3: typeof PlayCardRule;
|
|
41
|
-
4: typeof
|
|
42
|
-
5: typeof
|
|
43
|
-
6: typeof
|
|
44
|
-
7: typeof
|
|
42
|
+
4: typeof EndPlayerTurnRule;
|
|
43
|
+
5: typeof EndRoundRule;
|
|
44
|
+
6: typeof PrepareNextRoundRule;
|
|
45
|
+
7: typeof MayChallengeRule;
|
|
46
|
+
8: typeof ChallengeRule;
|
|
45
47
|
102: typeof LoyalSquireEffectRule;
|
|
46
48
|
103: typeof PrincessLithaEffectRule;
|
|
47
49
|
104: typeof RobbinsMasterOfArmsEffectRule;
|
package/dist/SkyriftRules.js
CHANGED
|
@@ -26,6 +26,7 @@ import { Memory } from './Memory';
|
|
|
26
26
|
import { ChallengeRule } from './rules/ChallengeRule';
|
|
27
27
|
import { DiscardEffectRule } from './rules/DiscardEffectRule';
|
|
28
28
|
import { DrawEffectRule } from './rules/DrawEffectRule';
|
|
29
|
+
import { EndPlayerTurnRule } from './rules/EndPlayerTurnRule';
|
|
29
30
|
import { EndRoundRule } from './rules/EndRoundRule';
|
|
30
31
|
import { GainCrystalEffectRule } from './rules/GainCrystalEffectRule';
|
|
31
32
|
import { MayChallengeRule } from './rules/MayChallengeRule';
|
|
@@ -41,6 +42,7 @@ export class SkyriftRules extends SecretMaterialRules {
|
|
|
41
42
|
[RuleId.StartRound]: StartRoundRule,
|
|
42
43
|
[RuleId.StartPlayerTurn]: StartPlayerTurnRule,
|
|
43
44
|
[RuleId.PlayCard]: PlayCardRule,
|
|
45
|
+
[RuleId.EndPlayerTurn]: EndPlayerTurnRule,
|
|
44
46
|
[RuleId.EndRound]: EndRoundRule,
|
|
45
47
|
[RuleId.PrepareNextRound]: PrepareNextRoundRule,
|
|
46
48
|
[RuleId.MayChallenge]: MayChallengeRule,
|
package/dist/rules/EffectRule.js
CHANGED
|
@@ -32,7 +32,7 @@ export class EffectRule extends PlayerTurnRule {
|
|
|
32
32
|
const currentPlayer = this.remind(Memory.CurrentPlayer);
|
|
33
33
|
const playerHelper = new PlayerHelper(this.game, currentPlayer);
|
|
34
34
|
if (this.remind(Memory.CardsPlayed, currentPlayer).length && playerHelper.hasMorePower()) {
|
|
35
|
-
return [this.startPlayerTurn(RuleId.
|
|
35
|
+
return [this.startPlayerTurn(RuleId.EndPlayerTurn, currentPlayer)];
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
38
38
|
return [this.startPlayerTurn(RuleId.PlayCard, this.remind(Memory.CurrentPlayer))];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CustomMove, PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { RuleId } from './RuleId';
|
|
3
|
+
export declare class EndPlayerTurnRule extends PlayerTurnRule {
|
|
4
|
+
getPlayerMoves(): CustomMove[];
|
|
5
|
+
onCustomMove(move: CustomMove): import("@gamepark/rules-api").StartPlayerTurn<number, RuleId.StartPlayerTurn>[];
|
|
6
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PlayerTurnRule } from '@gamepark/rules-api';
|
|
2
|
+
import { CustomMoveType } from '../CustomMoveType';
|
|
3
|
+
import { RuleId } from './RuleId';
|
|
4
|
+
export class EndPlayerTurnRule extends PlayerTurnRule {
|
|
5
|
+
getPlayerMoves() {
|
|
6
|
+
return [this.customMove(CustomMoveType.Pass)];
|
|
7
|
+
}
|
|
8
|
+
onCustomMove(move) {
|
|
9
|
+
if (move.type === CustomMoveType.Pass) {
|
|
10
|
+
return [this.startPlayerTurn(RuleId.StartPlayerTurn, this.nextPlayer)];
|
|
11
|
+
}
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -69,7 +69,7 @@ export class PlayCardRule extends PlayerTurnRule {
|
|
|
69
69
|
}
|
|
70
70
|
if (isMoveItemType(MaterialType.Card)(move) || isMoveItemType(MaterialType.PowerToken)(move)) {
|
|
71
71
|
if (this.remind(Memory.CardsPlayed, this.player).length > 0 && this.hasMorePower()) {
|
|
72
|
-
moves.push(this.
|
|
72
|
+
moves.push(this.startRule(RuleId.EndPlayerTurn));
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
return moves;
|
package/dist/rules/RuleId.d.ts
CHANGED
|
@@ -2,10 +2,11 @@ export declare enum RuleId {
|
|
|
2
2
|
StartRound = 1,
|
|
3
3
|
StartPlayerTurn = 2,
|
|
4
4
|
PlayCard = 3,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
EndPlayerTurn = 4,
|
|
6
|
+
EndRound = 5,
|
|
7
|
+
PrepareNextRound = 6,
|
|
8
|
+
MayChallenge = 7,
|
|
9
|
+
Challenge = 8,
|
|
9
10
|
LoyalSquireEffect = 102,
|
|
10
11
|
PrincessLithaEffect = 103,
|
|
11
12
|
RobbinsMasterOfArmsEffect = 104,
|
package/dist/rules/RuleId.js
CHANGED
|
@@ -4,10 +4,11 @@ export var RuleId;
|
|
|
4
4
|
RuleId[RuleId["StartRound"] = 1] = "StartRound";
|
|
5
5
|
RuleId[RuleId["StartPlayerTurn"] = 2] = "StartPlayerTurn";
|
|
6
6
|
RuleId[RuleId["PlayCard"] = 3] = "PlayCard";
|
|
7
|
-
RuleId[RuleId["
|
|
8
|
-
RuleId[RuleId["
|
|
9
|
-
RuleId[RuleId["
|
|
10
|
-
RuleId[RuleId["
|
|
7
|
+
RuleId[RuleId["EndPlayerTurn"] = 4] = "EndPlayerTurn";
|
|
8
|
+
RuleId[RuleId["EndRound"] = 5] = "EndRound";
|
|
9
|
+
RuleId[RuleId["PrepareNextRound"] = 6] = "PrepareNextRound";
|
|
10
|
+
RuleId[RuleId["MayChallenge"] = 7] = "MayChallenge";
|
|
11
|
+
RuleId[RuleId["Challenge"] = 8] = "Challenge";
|
|
11
12
|
RuleId[RuleId["LoyalSquireEffect"] = 102] = "LoyalSquireEffect";
|
|
12
13
|
RuleId[RuleId["PrincessLithaEffect"] = 103] = "PrincessLithaEffect";
|
|
13
14
|
RuleId[RuleId["RobbinsMasterOfArmsEffect"] = 104] = "RobbinsMasterOfArmsEffect";
|
package/package.json
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@gamepark/skyrift",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "The rules of SkyRift adapted for Game Park",
|
|
5
|
-
"sideEffects": false,
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "dist/index.js",
|
|
8
|
-
"types": "dist/index.d.ts",
|
|
9
|
-
"files": [
|
|
10
|
-
"dist"
|
|
11
|
-
],
|
|
12
|
-
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
13
|
-
"license": "ISC",
|
|
14
|
-
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
},
|
|
17
|
-
"scripts": {
|
|
18
|
-
"test": "vitest",
|
|
19
|
-
"build": "tsc",
|
|
20
|
-
"prepublishOnly": "tsc",
|
|
21
|
-
"publish": "lerna publish",
|
|
22
|
-
"lint": "eslint --fix"
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@gamepark/rules-api": ">=7",
|
|
26
|
-
"es-toolkit": "^1.39.10"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"@gamepark/rules-api": "~7.2.0",
|
|
30
|
-
"es-toolkit": "^1.43.0",
|
|
31
|
-
"vitest": "^4.0.15"
|
|
32
|
-
}
|
|
33
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@gamepark/skyrift",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "The rules of SkyRift adapted for Game Park",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"test": "vitest",
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"prepublishOnly": "tsc",
|
|
21
|
+
"publish": "lerna publish",
|
|
22
|
+
"lint": "eslint --fix"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@gamepark/rules-api": ">=7",
|
|
26
|
+
"es-toolkit": "^1.39.10"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@gamepark/rules-api": "~7.2.0",
|
|
30
|
+
"es-toolkit": "^1.43.0",
|
|
31
|
+
"vitest": "^4.0.15"
|
|
32
|
+
},
|
|
33
|
+
"gitHead": "176b2503bdbd91bd1cf868fcc0e8b42a44770256"
|
|
34
|
+
}
|