max 3 skills
This commit is contained in:
parent
5632713144
commit
4a6e2ca544
@ -137,7 +137,7 @@ function GamePanel(props) {
|
|||||||
function Cryp(cryp) {
|
function Cryp(cryp) {
|
||||||
const ko = cryp.hp.value === 0 ? 'ko' : '';
|
const ko = cryp.hp.value === 0 ? 'ko' : '';
|
||||||
|
|
||||||
const skills = range(0, 4).map(i => Skill(cryp, i));
|
const skills = range(0, 3).map(i => Skill(cryp, i));
|
||||||
|
|
||||||
const stats = [STATS.hp, STATS.redShield, STATS.blueShield].map((s, j) => (
|
const stats = [STATS.hp, STATS.redShield, STATS.blueShield].map((s, j) => (
|
||||||
<figure key={j} alt={s.stat}>
|
<figure key={j} alt={s.stat}>
|
||||||
@ -226,7 +226,7 @@ function GamePanel(props) {
|
|||||||
const selectedSkills = playerTeam.cryps.map((c, i) => stackElement(c, i));
|
const selectedSkills = playerTeam.cryps.map((c, i) => stackElement(c, i));
|
||||||
|
|
||||||
const mobileSkills = activeCryp
|
const mobileSkills = activeCryp
|
||||||
? range(0, 4).map(i => Skill(activeCryp, i, true))
|
? range(0, 3).map(i => Skill(activeCryp, i, true))
|
||||||
: (<div/>);
|
: (<div/>);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -87,7 +87,7 @@ function Info(args) {
|
|||||||
|
|
||||||
function infoCrypElement(cryp) {
|
function infoCrypElement(cryp) {
|
||||||
// onClick={() => setInfo('skill', { skill: s, cryp })}
|
// onClick={() => setInfo('skill', { skill: s, cryp })}
|
||||||
const skills = range(0, 4).map(i => {
|
const skills = range(0, 3).map(i => {
|
||||||
const skill = cryp.skills[i];
|
const skill = cryp.skills[i];
|
||||||
|
|
||||||
function skillClick() {
|
function skillClick() {
|
||||||
|
|||||||
@ -17,7 +17,7 @@ function Cryp(props) {
|
|||||||
setActiveCryp,
|
setActiveCryp,
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const skills = range(0, 4).map(i => {
|
const skills = range(0, 3).map(i => {
|
||||||
const skill = cryp.skills[i];
|
const skill = cryp.skills[i];
|
||||||
const s = skill
|
const s = skill
|
||||||
? skill.skill
|
? skill.skill
|
||||||
|
|||||||
@ -582,7 +582,7 @@ pub fn vbox_apply(params: VboxApplyParams, tx: &mut Transaction, account: &Accou
|
|||||||
let skill = var.into_skill().ok_or(format_err!("var {:?} has no associated skill", var))?;
|
let skill = var.into_skill().ok_or(format_err!("var {:?} has no associated skill", var))?;
|
||||||
let cryp = player.cryp_get(params.cryp_id)?;
|
let cryp = player.cryp_get(params.cryp_id)?;
|
||||||
// done here because i teach them a tonne of skills for tests
|
// done here because i teach them a tonne of skills for tests
|
||||||
let max_skills = 4;
|
let max_skills = 3;
|
||||||
if cryp.skills.len() >= max_skills {
|
if cryp.skills.len() >= max_skills {
|
||||||
return Err(format_err!("cryp at max skills ({:?})", max_skills));
|
return Err(format_err!("cryp at max skills ({:?})", max_skills));
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user