Coder Social home page Coder Social logo

kawa-oneechan / noxico Goto Github PK

View Code? Open in Web Editor NEW
27.0 5.0 6.0 17.47 MB

An erotic roguelike, basically.

Home Page: http://helmet.kafuka.org/noxico

License: Other

C# 96.75% Batchfile 0.17% Lua 2.91% Shell 0.17%
roguelike-game adult-content c-sharp lua-script nsfw fmod-api

noxico's Issues

slime release shape not working?

getting NullReferenceExceptions. the cause seems to be:
revert passing null to Character.Copy:

player.Character.Copy(null);

and then Copy trying to access a method of the null that was passed (see last line):

Noxico/Character.cs

Lines 2422 to 2427 in fec1bb1

public void Copy(Character source)
{
var copier = GetToken("copier");
if (copier == null)
throw new InvalidOperationException("Tried to copy, but is not a copier.");
var full = source.HasToken("fullCopy");

Combat

(Re-summarizing the Bitbucket issue...)

For melee attacks, if the aggressor bumps a valid target, we're golden. Calculate the attack. No need to counter, because the target will get a chance to retaliate in its own turn.

For ranged attacks, triggered by a dedicated key, use the cursor. Just like chatting, looking, and picking up items that aren't on your square. No LOS, no attack.

Bonus: you can't confuse an attack for an attempt to engage in shenanigans because that already has its own dedicated key.

(snip)

It's been a while, thought I'd post an update. We've got basically everything in the OP, plus the ability to fire long-range weapons in cardinal directions via shift-arrow keys. That's the easy bit. Besides that we got this thing where different types of attack react differently to various kinds of bodily material, determined via Lua script. For example, a punch has not much effect on a target made of metal or rubber, but stabbing someone with regular skin or fur has more effect. Using a given weapon exercises the relevant skill, so you get increasingly closer to the weapon's base damage. Armor bonuses are a work in progress.

Goals, Needs, Drives

(Reposting from Bitbucket)

Recently, I commented out the whole scheduler subsystem pending a more Lua-friendly replacement. Here's what I came up with:

Given no profession or goal, a character will wander around as current.

A character's stats will change over time, as would the player's.

Characters can have goals assigned, by the game or by their stats.

Goals have associated task lists. These tasks can themself contain tasks, being stored and managed as token trees, and any given subtree may cancel out.

For example, the "go to sleep" goal might be subdivided like this:

  1. get undressed
    1. do we have an assigned closet? if not, cancel this task -- that is, cancel "getting undressed", not cancel "going to sleep".
    2. go to the closet.
    3. undress and stash clothes.
  2. go to bed
    1. do we have an assigned bed? if not, is there a free bed nearby? if still not, cancel this task.
    2. go to the bed
  3. lay down and sleep.

Later, the "wake up" goal might be subdivided like this:

  1. stand up
  2. get dressed
    1. do we have an assigned closet? if not, cancel this task.
      2. go to the closet.
      3. pick out an outfit and equip it.

These two would be assigned at due time by the game, and might be adjusted by both random chance and personality traits.

Other goals may include "manage shop", "get off", "look for the player", "hunt for the player"...

Open question

How do we store these tasks, both in definition and as character data? How much of it is scripted? Perhaps all BoardChar would have a script run every time they get to make a move and that script processes their task Token, adding, removing, and replacing them as needed? That'd mean we'd have no more use of the Motor enum -- wandering and hunting would be handled by the task script, and standing still just equals having no task at all. never mind that we don't use Motor at all. But anyway basically the entirety of BoardChar:ActuallyMove() and BoardChar.Hunt() would be reduced to a script?

Postures

Basically, track characters' postures for various effects.

If you get knocked down, you switch to "prone". If you're on a chair tile and use it you switch to "seated". If you're on a bed tile and use it you switch to "prone", whether you choose to rest or not. Actually trying to walk switches you back to "standing" first.

Perhaps trying to walk while prone makes you crawl instead, trading speed for being harder to hit/see, and you can use < and > to get up/down on purpose as long as you're not on a stairway.

Sexual actions can then trivially filter against the participants' postures -- you can't do it missionary style while standing after all.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.