This commit is contained in:
ntr 2018-12-20 14:41:40 +11:00
parent e768c267f4
commit 9b180971ce
3 changed files with 0 additions and 51 deletions

View File

@ -12,8 +12,6 @@ use rpc::{AccountCreateParams, AccountLoginParams};
use cryp::{Cryp, CrypRecover, cryp_write};
use game::Game;
use item::{Item, item_create, ItemAction};
use failure::Error;
use failure::err_msg;

View File

@ -558,51 +558,3 @@ mod tests {
return;
}
}
// pub fn assign_str(&mut self, opp: &Cryp, plr_t: &mut Turn, opp_t: &Turn) -> &mut Cryp {
// // let final_str = opp_t.phys_dmg.result.saturating_sub(plr_t.agi.result);
// // let blocked = opp_t.phys_dmg.result.saturating_sub(final_str);
// let final_str = opp_t.phys_dmg.result & !plr_t.agi.result;
// let blocked = opp_t.phys_dmg.result & plr_t.agi.result;
// plr_t.log.push(format!("{:064b} <- attacking roll {:?}", opp_t.phys_dmg.result, opp_t.phys_dmg.result));
// // plr_t.log.push(format!("{:064b} <- blocking roll {:?}", plr_t.agi.result, plr_t.agi.result));
// plr_t.log.push(format!("{:064b} <- final str {:?} ({:?} blocked)", final_str, final_str, blocked));
// self.hp.reduce(final_str);
// plr_t.log.push(format!("{:?} deals {:?} str to {:?} ({:?} blocked / {:?} hp remaining)"
// ,opp.name
// ,final_str
// ,self.name
// ,blocked
// ,self.hp.base));
// plr_t.log.push(format!(""));
// self
// }
// fn roll(&self, c: &Cryp, log: &mut Vec<String>) -> Roll {
// let mut rng = thread_rng();
// let base: u64 = rng.gen();
// let mut roll = Roll { kind: self.kind, base, result: base };
// log.push(format!("{:?}", self.kind));
// log.push(format!("{:064b} <- base roll", base));
// // apply skills
// roll = c.skills.iter().fold(roll, |roll, s| s.apply(roll));
// // finally combine with CrypStat
// log.push(format!("{:064b} <- finalised", roll.result));
// roll.result = roll.result & self.base;
// log.push(format!("{:064b} & <- attribute roll", self.base));
// log.push(format!("{:064b} = {:?}", roll.result, roll.result));
// log.push(format!(""));
// return roll;
// }

View File

@ -3,7 +3,6 @@ use uuid::Uuid;
use postgres::transaction::Transaction;
use failure::Error;
use failure::err_msg;
// drops
use rand::prelude::*;