remove some cruft
This commit is contained in:
parent
5549e87fab
commit
28238ee812
@ -1,11 +0,0 @@
|
||||
## 02-09-2018
|
||||
* went full circle through the last 20 years of the web's problems
|
||||
* debated using vanilla tcp sockets but realised would be very time consuming
|
||||
* Struggled a lot with google/tarpc
|
||||
found the documentation absolutely mad, macros perform most of the functionality
|
||||
couldn't find any way to keep server running, client stub appears to direcly rely on the server structs
|
||||
needed a specific version of the rust nightly from several months ago to compile
|
||||
* found wa-rs, hope was restored, had a websocket server up and running in seconds
|
||||
* lost hope again when its client doesn't compile into wasm due to unix dependencies in mio
|
||||
this also prevents any tokio based futures client from working
|
||||
* realised i'd been reading very out of date documentation and there was plenty of work happening on `stdweb` and `cargo web`
|
||||
103
server/README.md
103
server/README.md
@ -2,96 +2,21 @@
|
||||
|
||||
## Setup
|
||||
|
||||
```
|
||||
rustup default nightly-2018-06-09-x86_64-unknown-linux-gnu
|
||||
```
|
||||
skill phase:
|
||||
1.1 -> block (sp 10) -> on self
|
||||
1.2 -> attack (sp 5) -> on team 2
|
||||
|
||||
## Items
|
||||
2.1 -> hex (sp 3) -> on team 1
|
||||
2.2 -> attack (sp 5) -> on team 1
|
||||
|
||||
## Rolling
|
||||
stat & rng
|
||||
block hash or totally random
|
||||
roll server that prints a roll every second?
|
||||
target phase:
|
||||
team 2 targets 1.2 on 2.2
|
||||
|
||||
friendship on ties?
|
||||
team 1 targets 2.1 on 1.1
|
||||
team 1 targets 2.2 on 1.1
|
||||
|
||||
Def
|
||||
0001011011001100110101000000101111100110101111110100100001000001 - roll
|
||||
0000000000000000000000000000000000000000000000000000000000001111 ^ steel armour
|
||||
0000000000000000000000000000000000000000000000000000001111000000 ^ stoney trait
|
||||
0001011011001100110101000000101111100110101111110100101111001111 = modified roll
|
||||
0000000000000000000000000000000000000000000000000000000111000010 & def attribute
|
||||
0000000000000000000000000000000000000000000000000000000111000010 = roll w/ stats
|
||||
|
||||
0000000000000000000000000000000000000000000000000000000001000000 = roll w/out stats
|
||||
|
||||
|
||||
## missions
|
||||
also the idea is like
|
||||
the currency is kinda like path right
|
||||
you're trying to get like chaos
|
||||
to reroll some stat
|
||||
or some item
|
||||
so maybe like a sword
|
||||
has 5 bits of damage it can guarantee
|
||||
but a badman-sabre has 16 bits
|
||||
and you keep blowing chaos on it til it gets 1111111111
|
||||
MashyToday at 9:04 PM
|
||||
yeah that would be cool
|
||||
natureToday at 9:05 PM
|
||||
i feel like that would make it kinda p2w
|
||||
so probably needs limits
|
||||
MashyToday at 9:05 PM
|
||||
I was thinking the p2w more just like making the needs and missions quicker right
|
||||
so like instead of feeding your dude you get some item where hes fed for 2 days or something
|
||||
or you could reduce the mission time which is like kinda pay to win but not really
|
||||
natureToday at 9:06 PM
|
||||
well what do the missions give you
|
||||
MashyToday at 9:06 PM
|
||||
well thats what i was thinking you'd do to get items
|
||||
so instead of doing a zone in an rpg and getting all this loot
|
||||
you send your dude out and you got a notification 4 hours later like success / failure this is what you got back
|
||||
natureToday at 9:07 PM
|
||||
i was thinking aobut that
|
||||
i don't really like the possibility of failure on a mission
|
||||
imagine sending your dude out on a mission for 2 days and it ceoms back like "nope wrong"
|
||||
i'd just fucken rq
|
||||
MashyToday at 9:08 PM
|
||||
Yeah
|
||||
natureToday at 9:08 PM
|
||||
BUT
|
||||
a better thing is like
|
||||
playing off crypto
|
||||
MashyToday at 9:08 PM
|
||||
its something like this https://www.youtube.com/watch?v=bXLW9dF7LN8
|
||||
YouTube
|
||||
Tommy J
|
||||
WoW: Garrison Mission Chance - How it Works
|
||||
|
||||
natureToday at 9:08 PM
|
||||
missions are like
|
||||
MashyToday at 9:08 PM
|
||||
so you get told before hand the % chance for success
|
||||
natureToday at 9:08 PM
|
||||
go and do 2000 overkill damage to some monster
|
||||
and your dude is out there using his items and rolling
|
||||
so it can happen quick if you're lucky
|
||||
or slow if you're not
|
||||
but still will eventually happen
|
||||
and then you get like easy limits for missions right
|
||||
MashyToday at 9:09 PM
|
||||
yeah that would be better actually
|
||||
natureToday at 9:09 PM
|
||||
like a creep that onl deals 100 dmg can't finish that mission
|
||||
i feel like that would be good
|
||||
cause then if you have like a defensive cryp
|
||||
it could have a defensive kinda mission
|
||||
like go and block 40000 damage in pve
|
||||
and then it gets some baller shield
|
||||
and is like speccing into defense
|
||||
MashyToday at 9:10 PM
|
||||
sounds better
|
||||
natureToday at 9:10 PM
|
||||
and like an offensive cryp could do that too
|
||||
but it might keep getting KOd
|
||||
and you hvae to pay to revive it
|
||||
resolve phase:
|
||||
1.1 <- block
|
||||
1.1 <- attack (no effect because of block)
|
||||
2.2 <- attack (normal resolve)
|
||||
1.1 <- hexed (no skills for the rest of this turn and next)
|
||||
|
||||
@ -16,7 +16,8 @@
|
||||
* skills
|
||||
* offensive -> choose target ✔
|
||||
* private fields for opponents
|
||||
* cooldowns reduce each turn
|
||||
* cooldowns reduce each turn ✔
|
||||
* statuses reduce each turn
|
||||
* teach cyps skills
|
||||
* can you attack yourself?
|
||||
* fetch existing battles
|
||||
@ -112,4 +113,25 @@ gem td style attr combinations
|
||||
* 17: You don't have to change much to change everything
|
||||
* 18: Restrictions breed creativity
|
||||
* 19: Your audience is good at recognizing problems and bad at solving them
|
||||
* 20: All the lessons connect
|
||||
* 20: All the lessons connect
|
||||
|
||||
|
||||
|
||||
skill phase:
|
||||
1.1 -> block (sp 10) -> on self
|
||||
1.2 -> attack (sp 5) -> on team 2
|
||||
|
||||
2.1 -> hex (sp 3) -> on team 1
|
||||
2.2 -> attack (sp 5) -> on team 1
|
||||
|
||||
target phase:
|
||||
team 2 targets 1.2 on 2.2
|
||||
|
||||
team 1 targets 2.1 on 1.1
|
||||
team 1 targets 2.2 on 1.1
|
||||
|
||||
resolve phase:
|
||||
1.1 <- block
|
||||
1.1 <- attack (no effect because of block)
|
||||
2.2 <- attack (normal resolve)
|
||||
1.1 <- hexed (no skills for the rest of this turn and next)
|
||||
|
||||
@ -21,7 +21,7 @@ pub struct CrypSkill {
|
||||
|
||||
impl CrypSkill {
|
||||
pub fn new(skill: Skill) -> CrypSkill {
|
||||
let turns = match skill {
|
||||
let cd = match skill {
|
||||
Skill::Attack => None,
|
||||
Skill::Block => Some(1),
|
||||
Skill::Dodge => Some(1),
|
||||
@ -33,7 +33,7 @@ impl CrypSkill {
|
||||
|
||||
CrypSkill {
|
||||
skill,
|
||||
cd: turns,
|
||||
cd,
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,6 +49,7 @@ impl CrypSkill {
|
||||
pub enum Status {
|
||||
Stunned,
|
||||
Silenced,
|
||||
Blocking,
|
||||
}
|
||||
|
||||
#[derive(Debug,Clone,Copy,PartialEq,Serialize,Deserialize)]
|
||||
@ -264,7 +265,7 @@ impl Cryp {
|
||||
return roll;
|
||||
}
|
||||
|
||||
pub fn stun(&mut self, roll: Roll) -> &mut Cryp {
|
||||
pub fn stun(&mut self, _roll: Roll) -> &mut Cryp {
|
||||
self.statuses.push(CrypStatus { status: Status::Stunned, turns: 1 });
|
||||
self
|
||||
}
|
||||
@ -274,6 +275,11 @@ impl Cryp {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn block(&mut self, _roll: Roll) -> &mut Cryp {
|
||||
self.statuses.push(CrypStatus { status: Status::Blocking, turns: 1 });
|
||||
self
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
pub fn cryp_get(tx: &mut Transaction, id: Uuid, account_id: Uuid) -> Result<Cryp, Error> {
|
||||
|
||||
@ -316,6 +316,8 @@ impl Game {
|
||||
let mut target = self.cryp_by_id(skill.target_cryp_id.unwrap()).unwrap().clone();
|
||||
let resolution = skill.resolve(&mut source, &mut target);
|
||||
|
||||
// do something with resolution
|
||||
|
||||
self.update_cryp(&mut source);
|
||||
self.update_cryp(&mut target);
|
||||
}
|
||||
@ -785,4 +787,27 @@ mod tests {
|
||||
assert!(game.team_by_id(y_team.id).cryps[0].skill_on_cd(Skill::Block).is_some());
|
||||
println!("{:#?}", game);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn block_test() {
|
||||
let mut game = create_test_game();
|
||||
|
||||
let x_team = game.teams[0].clone();
|
||||
let y_team = game.teams[1].clone();
|
||||
|
||||
let x_cryp = x_team.cryps[0].clone();
|
||||
let y_cryp = y_team.cryps[0].clone();
|
||||
|
||||
let x_block_id = game.add_skill(x_team.id, x_cryp.id, y_team.id, Skill::TestTouch).unwrap();
|
||||
let y_attack_id = game.add_skill(y_team.id, y_cryp.id, x_team.id, Skill::TestTouch).unwrap();
|
||||
|
||||
game.target_phase_start();
|
||||
game.add_target(x_team.id, x_cryp.id, y_attack_id).unwrap();
|
||||
game.add_target(y_team.id, y_cryp.id, x_block_id).unwrap();
|
||||
|
||||
game.damage_phase_start();
|
||||
|
||||
println!("{:#?}", game);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ impl Cast {
|
||||
// the real deal
|
||||
Skill::Stun => target.stun(roll),
|
||||
Skill::Attack => target.attack(roll),
|
||||
Skill::Block => target,
|
||||
Skill::Block => target.block(roll),
|
||||
Skill::Heal => target,
|
||||
Skill::Dodge => target,
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user