Skip to content

Commit

Permalink
Merge branch 'master' into 231-website-overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
lxgr-linux committed Dec 26, 2023
2 parents a37b197 + a7e426c commit 07739d9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#VITE_API_COSMOS="http://lxgr.xyz:1317"
#VITE_WS_TENDERMINT="http://lxgr.xyz:26657"
#VITE_APP_FAUCET="http://lxgr.xyz:4500/claimTokens"

VITE_API_COSMOS="https://cardchain.crowdcontrol.network/cosmos/"
VITE_WS_TENDERMINT="https://cardchain.crowdcontrol.network/tendermint/"
VITE_APP_FAUCET="https://cardchain.crowdcontrol.network/faucet/claimTokens"

VITE_APP_FAUCET_SITEKEY="ea68532a-a9e6-4f99-9361-db90a3071b72"
VITE_APP_ADDRESS_PREFIX=cc
VITE_APP_CHAIN_ID="cardtestnet-5"
VITE_APP_CHAIN_ID="cardtestnet-6"
VITE_APP_CHAIN_NAME="Cardchain"
VITE_APP_CARDIMG_MAXKB=500
VITE_APP_CARDIMG_SIZE_X=840
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"axios": "^1.5.1",
"bignumber.js": "^9.1.0",
"crypto-js": "^4.2.0",
"decentralcardgame-cardchain-client-ts": "^0.0.25",
"decentralcardgame-cardchain-client-ts": "0.0.25",
"long": "^5.2.0",
"merge-images": "^2.0.0",
"pinia": "^2.0.23",
Expand Down
33 changes: 21 additions & 12 deletions src/views/CardCreatorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,7 @@ export default {
)
return
}
if (this.designateArtist && !this.$cardChain.validAddress(this.artistAddress)) {
if (this.designateArtist && !validAddress(this.artistAddress)) {
this.notifyFail(
"Invalid Address",
"The address given for designated artist is invalid."
Expand Down Expand Up @@ -1167,6 +1167,20 @@ export default {
this.abilities
);
}
// if an ability was created, but it has no effect, then this should be fixed
if (newModel.Abilities.length > 0) {
let effectsList = R.flatten(R.map(
x => R.values(R.pluck("Effects", x)),
newModel.Abilities))
if (R.any(y => y === undefined, effectsList)) {
this.notifyFail(
"Useless Ability",
"Card has an Ability, which does not do anything. Please add an Effect to the Ability."
);
return;
}
}
} else if (this.model.type === "Action") {
// check if the old effects should be restored
if (this.mode == Mode.EDIT && !this.clearAbilities && R.isEmpty(this.abilities)) {
Expand All @@ -1183,20 +1197,15 @@ export default {
this.abilities
);
}
}
// if an ability was created, but it has no effect, then this should be fixed
if (newModel.Abilities.length > 0) {
let effectsList = R.flatten(R.map(
x => R.values(R.pluck("Effects", x)),
newModel.Abilities))
if (R.any(y => y === undefined, effectsList)) {
// if an ability was created, but it has no effect, then this should be fixed
if (newModel.Effects.length == 0) {
console.log("newmodel", newModel)
this.notifyFail(
"Useless Ability",
"Card has an Ability, which does not do anything. Please add an Effect to the Ability."
"No Effects",
"Card has no effect. Maybe you forgot to add an effect?"
);
return;
}
}
Expand Down

0 comments on commit 07739d9

Please sign in to comment.