-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package keywords | ||
|
||
import ( | ||
"github.com/DecentralCardGame/cardobject/cardobject" | ||
"github.com/DecentralCardGame/cardobject/jsonschema" | ||
) | ||
|
||
type hasten struct { | ||
Target cardobject.CardMode | ||
} | ||
|
||
func (h hasten) ValidateType(r jsonschema.RootElement) error { | ||
return jsonschema.ValidateStruct(h, r) | ||
} | ||
|
||
func (h hasten) InteractionText() string { | ||
return "Hasten §Target" | ||
} | ||
|
||
func (h hasten) Description() string { | ||
return "Allow a friendly Entity's to attack the turn it is played." | ||
} | ||
|
||
func (h hasten) Classes() []jsonschema.Class { | ||
return []jsonschema.Class{cardobject.MYSTICISM, cardobject.CULTURE} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package keywords | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestHasten(t *testing.T) { | ||
hasten := hasten{"ALL"} | ||
err := hasten.ValidateType(allClassesTestCard()) | ||
if err != nil { | ||
t.Error(err) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package keywords | ||
|
||
import ( | ||
"github.com/DecentralCardGame/cardobject/cardobject" | ||
"github.com/DecentralCardGame/cardobject/jsonschema" | ||
) | ||
|
||
type trample struct{} | ||
|
||
func (t trample) ValidateType(r jsonschema.RootElement) error { | ||
return jsonschema.ValidateStruct(t, r) | ||
} | ||
|
||
func (t trample) InteractionText() string { | ||
return "Trample." | ||
} | ||
|
||
func (t trample) Description() string { | ||
return "Deals excess damage to enemy places/HQ." | ||
} | ||
|
||
func (t trample) Classes() []jsonschema.Class { | ||
return []jsonschema.Class{cardobject.TECHNOLOGY, cardobject.NATURE} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package keywords | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestTrample(t *testing.T) { | ||
trample := trample{} | ||
err := trample.ValidateType(allClassesTestCard()) | ||
if err != nil { | ||
t.Error(err) | ||
} | ||
} |